Iros
 
Loading...
Searching...
No Matches
try_infallible.h
Go to the documentation of this file.
1#pragma once
2
4#include "di/meta/language.h"
6#include "di/meta/util.h"
7#include "di/meta/vocab.h"
10
11namespace di::vocab {
12namespace detail {
14 template<concepts::Expected T>
17 constexpr auto operator()(T&& value) const -> meta::ExpectedValue<T> {
18 return util::forward<T>(value).value();
19 }
20
21 constexpr void operator()(Expected<void, void>) const {}
22
23 template<concepts::Expected T>
25 constexpr auto operator()(T&& value) const -> meta::Decay<T> {
26 return util::forward<T>(value);
27 }
28 };
29}
30
32}
33
34namespace di {
36}
Definition expected_forward_declaration.h:8
Definition operations.h:11
Definition core.h:128
Conditional< concepts::LanguageArray< RemoveReference< T > >, RemoveExtent< RemoveReference< T > > *, Conditional< concepts::LanguageFunction< RemoveReference< T > >, AddPointer< RemoveReference< T > >, RemoveCVRef< T > > > Decay
Definition language.h:574
Type< detail::LikeHelper< T, U > > Like
Definition language.h:468
meta::RemoveCVRef< T >::Value ExpectedValue
Definition vocab.h:35
Definition erasure_cast.h:7
Definition lazy.h:165
constexpr auto try_infallible
Definition try_infallible.h:31
Definition zstring_parser.h:9
Definition try_infallible.h:13
constexpr void operator()(Expected< void, void >) const
Definition try_infallible.h:21