8 template <
typename T,
typename TYPE_TAG>
16 template <
typename...
ARGS,
typename =
typename std::enable_if<std::is_constructible<T,
ARGS...>::value>::type>
17 constexpr explicit named(
ARGS&&...
args)
noexcept(std::is_nothrow_constructible<T,
ARGS...>::value) : value(std::forward<
ARGS>(
args)...) {}
28 T
const&
get()
const& {
return value; }
29 T
get()&& {
return std::move(value); }
37 constexpr explicit operator base_type()
const noexcept {
return value; }
39 constexpr bool operator <(named
const&
other)
const {
return value <
other.value; }
40 constexpr bool operator <=(named
const&
other)
const {
return value <=
other.value; }
41 constexpr bool operator >(named
const&
other)
const {
return value >
other.value; }
42 constexpr bool operator >=(named
const&
other)
const {
return value >=
other.value; }
43 constexpr bool operator ==(named
const&
other)
const {
return value ==
other.value; }
44 constexpr bool operator !=(named
const&
other)
const {
return value !=
other.value; }
46 friend constexpr bool operator <(T
const& value, named
const&
other) {
return value <
other.value; }
47 friend constexpr bool operator <=(T
const& value, named
const&
other) {
return value <=
other.value; }
48 friend constexpr bool operator >(T
const& value, named
const&
other) {
return value >
other.value; }
49 friend constexpr bool operator >=(T
const& value, named
const&
other) {
return value >=
other.value; }
50 friend constexpr bool operator ==(T
const& value, named
const&
other) {
return value ==
other.value; }
51 friend constexpr bool operator !=(T
const& value, named
const&
other) {
return value !=
other.value; }
constexpr auto bit_count
Equal to the number of bits in the type.
nlohmann::json const & get(nlohmann::json const &g, std::string_view key, jtype type=jtype::discarded)
Gets the item in the json object g with the key key, or an empty json object if none found.
Primary namespace for everything in this library.