repr 0.1
Reconstructable string representations and more
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages Concepts
reflection/enum.h
Go to the documentation of this file.
#pragma once
#include <type_traits>
#include "category.h"
namespace librepr {
template <typename T>
struct Reflect;
template <typename T>
requires std::is_enum_v<T>
struct Reflect<T> : category::Type<T> {
using type = T;
constexpr static auto enumerator_names = librepr::enum_names<T>();
constexpr static bool can_descend = false;
// TODO enum values -> names mapping
template <typename V>
static void visit(V&& visitor, T& obj) {
}
};
} // namespace librepr