• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 or equal to another JSON value `rhs` by calculating
14`#!cpp !(lhs < rhs)`.
15
16## Template parameters
17
18`ScalarType`
19:   a scalar type according to `std::is_scalar<ScalarType>::value`
20
21## Parameters
22
23`lhs` (in)
24:   first value to consider
25
26`rhs` (in)
27:   second value to consider
28
29## Return value
30
31whether `lhs` is less than or equal to `rhs`
32
33## Exception safety
34
35No-throw guarantee: this function never throws exceptions.
36
37## Complexity
38
39Linear.
40
41## Example
42
43??? example
44
45    The example demonstrates comparing several JSON types.
46
47    ```cpp
48    --8<-- "examples/operator__greaterequal.cpp"
49    ```
50
51    Output:
52
53    ```json
54    --8<-- "examples/operator__greaterequal.output"
55    ```
56
57## Version history
58
59- Added in version 1.0.0.
60