tagval 0.2.0
Modern C++23 header-only library of tagged values (open/closed enumerations with metadata)
Loading...
Searching...
No Matches
ostream.hpp
Go to the documentation of this file.
1#pragma once
2
5
6#include <tagval/base.hpp>
7
8#include <concepts>
9#include <ostream>
10
11namespace tagval {
12
13template <typename T>
14 requires std::derived_from<T, detail::TagValBaseTag>
15inline std::ostream& operator<<(std::ostream& os, const T& v) {
16 return os << v.code();
17}
18
19} // namespace tagval
CRTP HandleBase used by ClosedEnded and OpenEnded.
Definition base.hpp:26
std::ostream & operator<<(std::ostream &os, const T &v)
Definition ostream.hpp:15