Iros
 
Loading...
Searching...
No Matches
as_fallible.h
Go to the documentation of this file.
1#pragma once
2
5#include "di/meta/util.h"
6#include "di/meta/vocab.h"
8
9namespace di::vocab {
10namespace detail {
12 template<concepts::Expected T>
14 constexpr auto operator()(T&& value) const -> meta::Decay<T> {
15 return util::forward<T>(value);
16 }
17
18 template<typename T, typename R = Expected<meta::UnwrapRefRValue<T>, void>>
20 constexpr auto operator()(T&& value) const -> R {
21 return util::forward<T>(value);
22 }
23 };
24}
25
26constexpr inline auto as_fallible = detail::AsFallibleFunction {};
27}
28
29namespace di {
31}
Definition operations.h:11
Definition vocab.h:30
Conditional< concepts::LanguageArray< RemoveReference< T > >, RemoveExtent< RemoveReference< T > > *, Conditional< concepts::LanguageFunction< RemoveReference< T > >, AddPointer< RemoveReference< T > >, RemoveCVRef< T > > > Decay
Definition language.h:574
Definition erasure_cast.h:7
Definition lazy.h:165
constexpr auto as_fallible
Definition as_fallible.h:26
Definition zstring_parser.h:9
Definition as_fallible.h:11