sandbox
Loading...
Searching...
No Matches
enumerator.hpp
1// SPDX-License-Identifier: MIT
2#ifndef LIBSBX_REFLECTION_ENUMERATOR_HPP_
3#define LIBSBX_REFLECTION_ENUMERATOR_HPP_
4
5#include <string_view>
6
7namespace sbx::reflection {
8
9template<typename Enum>
10struct enumerator {
11
12 using enum_type = Enum;
13
14 std::string_view name;
15 Enum value;
16
17}; // struct enumerator
18
19template<typename Enum>
20enumerator(std::string_view, Enum) -> enumerator<Enum>;
21
22} // namespace sbx::reflection
23
24#endif // LIBSBX_REFLECTION_ENUMERATOR_HPP_
Definition: enumerator.hpp:10