Iros
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::meta::UnderlyingType
__underlying_type(T) UnderlyingType
Definition
language.h:267
di::util::detail
Definition
clamp.h:9
di::util
Definition
vocab.h:96
di::util::to_underlying
constexpr auto to_underlying
Definition
to_underlying.h:15
di
Definition
zstring_parser.h:9
di::util::detail::ToUnderlyingFunction
Definition
to_underlying.h:7
di::util::detail::ToUnderlyingFunction::operator()
constexpr auto operator()(T value) const
Definition
to_underlying.h:9
libs
di
include
di
util
to_underlying.h
Generated by
1.13.0