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
5
namespace
di::util
{
6
namespace
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
15
constexpr
inline
auto
to_underlying
= detail::ToUnderlyingFunction {};
16
}
17
18
namespace
di
{
19
using
util::to_underlying
;
20
}
language.h
di::function::value
constexpr auto value
Definition
value.h:34
di::meta::UnderlyingType
__underlying_type(T) UnderlyingType
Definition
language.h:267
di::util
Definition
vocab.h:96
di::util::to_underlying
constexpr auto to_underlying
Definition
to_underlying.h:15
di
Definition
any_storable.h:9
di
util
to_underlying.h
Generated by
1.13.2