BoosterSeat
0.1
A C++ library that includes common utilities that are used in other projects.
template_tools.hpp
Go to the documentation of this file.
1
#ifndef TEMPLATE_TOOLS_HPP_
2
#define TEMPLATE_TOOLS_HPP_
3
4
#include <type_traits>
5
6
namespace
bst
{
7
namespace
template_tools {
8
18
template
<
typename
E>
19
constexpr
auto
to_underlying
(E e) noexcept {
20
return
static_cast<
std::underlying_type_t<E>
>
(e);
21
}
22
23
}
// namespace template_tools
24
}
// namespace bst
25
26
#endif
/* TEMPLATE_TOOLS_HPP_ */
bst::template_tools::to_underlying
constexpr auto to_underlying(E e) noexcept
Converts an enum class to its underlying type.
Definition:
template_tools.hpp:19
bst
Definition:
filesystem.cpp:34
include
BoosterSeat
template_tools.hpp
Generated by
1.9.1