mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-12-21 12:10:17 +00:00
experimenting; not looking to pr
This commit is contained in:
@@ -6,10 +6,10 @@
|
||||
|
||||
namespace StringifiedEnum {
|
||||
template<typename T>
|
||||
const std::string_view ToString(const T e) {
|
||||
constexpr std::string_view ToString(const T e) {
|
||||
static_assert(std::is_enum_v<T>, "Not an enum"); // Check type
|
||||
|
||||
constexpr auto& sv = magic_enum::enum_entries<T>();
|
||||
constexpr const auto& sv = magic_enum::enum_entries<T>();
|
||||
|
||||
const auto it = std::lower_bound(
|
||||
sv.begin(), sv.end(), e,
|
||||
|
||||
Reference in New Issue
Block a user