OGS
cpp23.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2
// SPDX-License-Identifier: BSD-3-Clause
3
4
#pragma once
5
6
#include <type_traits>
7
8
// ToDo (tm) remove with c++23
9
10
namespace
BaseLib
11
{
21
template
<
typename
E>
22
constexpr
auto
to_underlying
(E e)
noexcept
23
{
24
return
static_cast<
std::underlying_type_t<E>
>
(e);
25
}
26
}
// namespace BaseLib
BaseLib
Definition
TestDefinition.h:13
BaseLib::to_underlying
constexpr auto to_underlying(E e) noexcept
Converts an enumeration to its underlying type.
Definition
cpp23.h:22
BaseLib
cpp23.h
Generated by
1.14.0