draconisplusplus/include/rfl/internal/lit_name.hpp

24 lines
452 B
C++
Raw Normal View History

2024-05-31 22:59:00 -04:00
#ifndef RFL_INTERNAL_LIT_NAME_HPP_
#define RFL_INTERNAL_LIT_NAME_HPP_
#include "../Literal.hpp"
namespace rfl {
2024-06-08 14:10:59 -04:00
namespace internal {
2024-05-31 22:59:00 -04:00
2024-06-08 14:10:59 -04:00
template <class T>
struct lit_name;
2024-05-31 22:59:00 -04:00
2024-06-08 14:10:59 -04:00
template <auto _name>
struct lit_name<rfl::Literal<_name>> {
constexpr static auto name_ = _name;
};
2024-05-31 22:59:00 -04:00
2024-06-08 14:10:59 -04:00
template <class LiteralType>
constexpr auto lit_name_v = lit_name<LiteralType>::name_;
2024-05-31 22:59:00 -04:00
2024-06-08 14:10:59 -04:00
} // namespace internal
} // namespace rfl
2024-05-31 22:59:00 -04:00
#endif