JSON for Modern C++ 3.10.3

◆ subtype()

template<typename BinaryType >
constexpr subtype_type nlohmann::byte_container_with_subtype< BinaryType >::subtype ( ) const
inlineconstexprnoexcept

Returns the numerical subtype of the value if it has a subtype. If it does not have a subtype, this function will return subtype_type(-1) as a sentinel value.

Returns
the numerical subtype of the binary value
Complexity
Constant.
Exception safety
No-throw guarantee: this member function never throws exceptions.
See also
see set_subtype() – sets the binary subtype
see clear_subtype() – clears the binary subtype
see has_subtype() – returns whether or not the binary value has a subtype
Since
version 3.8.0; fixed return value to properly return subtype_type(-1) as documented in version 3.10.0

Definition at line 5202 of file json.hpp.