1#ifndef CAPYMETA_STATIC_MAYBE_HPP_
2#define CAPYMETA_STATIC_MAYBE_HPP_
22template<
typename Value,
typename Tag>
25template<
typename Value>
30 : value_ { std::move(
value) }
39 template<
typename Self>
40 constexpr decltype(
auto)
value(
this Self&& self)
42 return std::forward<Self>(self).value_;
47 return std::optional { std::move(this->value_) };
51 static constexpr bool HAS_VALUE =
true;
57template<
typename Value>
66 template<
typename Self>
67 constexpr decltype(
auto)
value(
this Self&& self)
69 static_assert(
false,
"Trying to retrieve value from null optional");
78 static constexpr bool HAS_VALUE =
false;
81template<
typename Value>
84template<
typename Value>