template<template< typename U, typename V, typename... Args > class ObjectType = std::map, template< typename U, typename... Args > class ArrayType = std::vector, class StringType = std::string, class BooleanType = bool, class NumberIntegerType = std::int64_t, class NumberUnsignedType = std::uint64_t, class NumberFloatType = double, template< typename U > class AllocatorType = std::allocator, template< typename T, typename SFINAE=void > class JSONSerializer = adl_serializer, class BinaryType = std::vector<std::uint8_t>>
template<typename ScalarType , typename std::enable_if< std::is_scalar< ScalarType >
::value, int >
::type = 0>
comparison: less than
comparison: less than
Compares whether one JSON value lhs is less than another JSON value rhs according to the following rules:
- If lhs and rhs have the same type, the values are compared using the default
<
operator.
- Integer and floating-point numbers are automatically converted before comparison
- In case lhs and rhs have different types, the values are ignored and the order of the types is considered, see operator<(const value_t, const value_t).
- Parameters
-
[in] | lhs | first JSON value to consider |
[in] | rhs | second JSON value to consider |
- Returns
- whether lhs is less than rhs
@complexity Linear.
@exceptionsafety No-throw guarantee: this function never throws exceptions.
@liveexample{The example demonstrates comparing several JSON types.,operator__less}
- Since
- version 1.0.0
Definition at line 24321 of file json.hpp.
24322 {
24324 }
basic_json(const value_t v)
create an empty value with a given type