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

CRTP HandleBase used by ClosedEnded and OpenEnded. More...

#include <tagval/descriptor.hpp>
#include <tagval/entry.hpp>
#include <tagval/error.hpp>
#include <commons/color.hpp>
#include <commons/fixed_string.hpp>
#include <commons/icon.hpp>
#include <compare>
#include <concepts>
#include <expected>
#include <optional>
#include <span>
#include <string_view>
+ Include dependency graph for base.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  tagval::detail::TagValBaseTag
 Empty marker base — used by std::hash / std::formatter / operator<< specializations to recognize all tagval value types. More...
 
class  tagval::detail::HandleBase< Id, Derived >
 CRTP handle. More...
 

Namespaces

namespace  tagval
 
namespace  tagval::detail
 

Concepts

concept  tagval::detail::HasMakeDescriptor
 

Functions

template<comms::FixedString Id, typename Derived >
constexpr TagValDescriptor tagval::detail::compute_descriptor () noexcept
 

Detailed Description

CRTP HandleBase used by ClosedEnded and OpenEnded.

A handle's runtime data is a single const TagValMetadata*. The Derived class itself is the handle. The marker class TagValBaseTag lets generic specializations of std::hash, std::formatter and operator<< match every tagval type via std::derived_from.