tagval 0.2.0
Modern C++23 header-only library of tagged values (open/closed enumerations with metadata)
Loading...
Searching...
No Matches
closed_ended.hpp File Reference

ClosedEnded base — values come from a compile-time Values<...> list. More...

#include <tagval/base.hpp>
#include <tagval/entry.hpp>
#include <tagval/open_ended.hpp>
#include <tagval/values.hpp>
#include <commons/fixed_string.hpp>
#include <expected>
#include <span>
#include <string_view>
+ Include dependency graph for closed_ended.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  tagval::ClosedEnded< Id, Derived >
 CRTP base for tag-value kinds whose values are fixed at compile time. More...
 

Namespaces

namespace  tagval
 

Detailed Description

ClosedEnded base — values come from a compile-time Values<...> list.

Required Derived shape:

  • Derives from tagval::ClosedEnded<"id", Derived>.
  • Declares using values_t = tagval::Values<E1, E2, ...> listing every entry; each E_i must be a tagval::Entry whose owner_t is Derived.
  • Each entry is typically declared in-class with TAGVAL_ENTRY or TAGVAL_ENTRY_AS so the per-entry accessor is generated automatically.