JSON for Modern C++  3.9.0

◆ subtype()

template<typename BinaryType >
constexpr std::uint8_t 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 size_t(-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
set_subtype() – sets the binary subtype
clear_subtype() – clears the binary subtype
has_subtype() – returns whether or not the binary value has a subtype
Since
version 3.8.0

Definition at line 4519 of file json.hpp.