di 0.1.0
Loading...
Searching...
No Matches
to_underlying.h
Go to the documentation of this file.
1#pragma once
2
3#include "di/meta/language.h"
4
5namespace di::util {
6namespace detail {
7 struct ToUnderlyingFunction {
8 template<concepts::Enum T>
9 constexpr auto operator()(T value) const {
10 return static_cast<meta::UnderlyingType<T>>(value);
11 }
12 };
13}
14
15constexpr inline auto to_underlying = detail::ToUnderlyingFunction {};
16}
17
18namespace di {
20}
constexpr auto value
Definition value.h:34
__underlying_type(T) UnderlyingType
Definition language.h:267
Definition vocab.h:96
constexpr auto to_underlying
Definition to_underlying.h:15
Definition any_storable.h:9