use_category
Overrides the category of conversion of a type.
Synopsis
Defined in header <boost/json/conversion.hpp>.
template<
class T,
class Ctx = void,
class Enable = void>
struct use_category;
Description
Specializations should provide the static member constant value that is equal to an enumerator of conversion_category that represents the suitable conversion category of T in context Ctx.
The primary template’s value is equal to conversion_category::unknown.
Use void for Ctx (the default) if the category should apply regardless of context.
The third template parameter can be used for conditional specializations.
Usage example:
namespace boost {
namespace json {
template <>
struct conversion_category<your::string> : string_category
{ };
} // namespace boost
} // namespace json
See Also
Convenience header <boost/json.hpp>.