1# basic_json::operator> 2 3```cpp 4bool operator>(const_reference lhs, const_reference rhs) noexcept, 5 6template<typename ScalarType> 7bool operator>(const_reference lhs, const ScalarType rhs) noexcept; 8 9template<typename ScalarType> 10bool operator>(ScalarType lhs, const const_reference rhs) noexcept; 11``` 12 13Compares whether one JSON value `lhs` is greater than another JSON value `rhs` by calculating `#!cpp !(lhs <= rhs)`. 14 15## Template parameters 16 17`ScalarType` 18: a scalar type according to `std::is_scalar<ScalarType>::value` 19 20## Parameters 21 22`lhs` (in) 23: first value to consider 24 25`rhs` (in) 26: second value to consider 27 28## Return value 29 30whether `lhs` is greater than `rhs` 31 32## Exception safety 33 34No-throw guarantee: this function never throws exceptions. 35 36## Complexity 37 38Linear. 39 40## Example 41 42??? example 43 44 The example demonstrates comparing several JSON types. 45 46 ```cpp 47 --8<-- "examples/operator__greater.cpp" 48 ``` 49 50 Output: 51 52 ```json 53 --8<-- "examples/operator__greater.output" 54 ``` 55 56## Version history 57 58- Added in version 1.0.0. 59