Iros
 
Loading...
Searching...
No Matches
enum_to_string.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace di::reflection {
7namespace detail {
9 constexpr auto operator()(concepts::ReflectableToEnumerators auto value) const {
10 auto result = "[<Invalid Enum Value>]"_sv;
12 [&](auto enumerator) {
13 if (enumerator.value == value) {
14 // NOTE: the strings in this library are compile-time values (with fixed length), so we need to
15 // convert them to a normal string view.
17 }
18 },
19 reflection::reflect(value));
20 return result;
21 }
22 };
23}
24
26}
27
28namespace di {
30}
constexpr auto fixed_string_to_utf8_string_view
Definition fixed_string_to_utf8_string_view.h:32
Definition enum_to_string.h:7
Definition atom.h:8
constexpr auto enumerator
Definition enumerator.h:36
constexpr auto enum_to_string
Definition enum_to_string.h:25
constexpr auto reflect
Definition reflect.h:46
Definition zstring_parser.h:9
constexpr void tuple_for_each(F &&function, Tup &&tuple)
Definition tuple_for_each.h:22
constexpr auto operator()(concepts::ReflectableToEnumerators auto value) const
Definition enum_to_string.h:9