The Battle for Wesnoth  1.17.4+dev
Classes | Namespaces | Macros
enum_base.hpp File Reference
#include <optional>
#include <string>
#include <tuple>
Include dependency graph for enum_base.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  string_enums::enum_base< T >
 The base template for associating string values with enum values. More...




#define ENUM_AND_ARRAY(...)

Macro Definition Documentation


#define ENUM_AND_ARRAY (   ...)
enum class type { __VA_ARGS__ }; \
/** Provide a alias template for an array of matching size. */ \
template<typename T> \
using sized_array = std::array<T, std::tuple_size<decltype(std::make_tuple(__VA_ARGS__))>::value>; \
static constexpr sized_array<const char*> values{__VA_ARGS__};

Definition at line 85 of file enum_base.hpp.