Go to the documentation of this file.
9 #ifndef EAGINE_ENUM_LOG_HPP
10 #define EAGINE_ENUM_LOG_HPP
14 #include <type_traits>
18 template <
typename Self,
typename T,
identifier_t LibId,
identifier_t Id>
19 static constexpr
auto adapt_log_entry_arg(
21 enum_class<Self, T, LibId, Id> ec,
22 std::enable_if_t<std::is_signed_v<T>, T> = {}) {
23 return [=](logger_backend& backend) {
24 backend.add_integer(name,
identifier{Id}, ec._value);
28 template <
typename Self,
typename T,
identifier_t LibId,
identifier_t Id>
29 static constexpr
auto adapt_log_entry_arg(
31 enum_class<Self, T, LibId, Id> ec,
32 std::enable_if_t<std::is_unsigned_v<T>, T> = {}) {
33 return [=](logger_backend& backend) {
34 backend.add_unsigned(name,
identifier{Id}, ec._value);
40 #endif // EAGINE_ENUM_LOG_HPP
Common code is placed in this namespace.
Definition: eagine.hpp:21
basic_identifier< 10, 6, default_identifier_char_set, identifier_t > identifier
Default identifier type used throughout the project.
Definition: identifier.hpp:346