floating_point_category

Conversion category for floating-point types.

Synopsis

Defined in header <boost/json/conversion.hpp>.

using floating_point_category = std::integral_constant< conversion_category, conversion_category::floating_point >;

Description

Floating-point types are represented in JSON as numbers.

By default a type T is considered an integer if std::is_floating_point<T>::value is true.

Users can specialize conversion_category_of for their own types if they want them to be treated as floating-point types. For example:

namespace boost { namespace json {

template <>
struct conversion_category_of<your::number> : floating_point_category
{ };

} }

Matching Types

Convenience header <boost/json.hpp>.