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 two JSON values for inequality 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 the values `lhs` and `rhs` are not equal 31 32## Exception safety 33 34No-throw guarantee: this function never throws exceptions. 35 36## Complexity 37 38Linear. 39 40## Example 41 42The example demonstrates comparing several JSON 43types. 44 45```cpp 46--8<-- "examples/operator__notequal.cpp" 47``` 48 49Output: 50 51```json 52--8<-- "examples/operator__notequal.output" 53``` 54 55## Version history 56 57- Added in version 1.0.0. 58