:memo: add more API documentation
diff --git a/doc/docset/docSet.sql b/doc/docset/docSet.sql index 93fd478..500de59 100644 --- a/doc/docset/docSet.sql +++ b/doc/docset/docSet.sql
@@ -79,7 +79,9 @@ INSERT INTO searchIndex(name, type, path) VALUES ('operator=', 'Operator', 'api/basic_json/operator=/index.html'); INSERT INTO searchIndex(name, type, path) VALUES ('operator==', 'Operator', 'api/basic_json/operator==/index.html'); INSERT INTO searchIndex(name, type, path) VALUES ('operator<', 'Operator', 'api/basic_json/operator</index.html'); +INSERT INTO searchIndex(name, type, path) VALUES ('operator<=', 'Operator', 'api/basic_json/operator<=/index.html'); INSERT INTO searchIndex(name, type, path) VALUES ('operator>', 'Operator', 'api/basic_json/operator>/index.html'); +INSERT INTO searchIndex(name, type, path) VALUES ('operator>=', 'Operator', 'api/basic_json/operator>=/index.html'); INSERT INTO searchIndex(name, type, path) VALUES ('operator[]', 'Operator', 'api/basic_json/operator[]/index.html'); INSERT INTO searchIndex(name, type, path) VALUES ('operator""_json', 'Literal', 'api/basic_json/operator_literal_json/index.html'); INSERT INTO searchIndex(name, type, path) VALUES ('operator""_json_pointer', 'Literal', 'api/basic_json/operator_literal_json_pointer/index.html');
diff --git a/doc/mkdocs/docs/api/basic_json/index.md b/doc/mkdocs/docs/api/basic_json/index.md index ff00525..cccb5d4 100644 --- a/doc/mkdocs/docs/api/basic_json/index.md +++ b/doc/mkdocs/docs/api/basic_json/index.md
@@ -194,9 +194,9 @@ - [**operator==**](operator==.md) - comparison: equal - [**operator!=**](operator!=.md) - comparison: not equal - [**operator<**](operator<.md) - comparison: less than -- operator<= - comparison: less than or equal +- [**operator<=**](operator<=.md) - comparison: less than or equal - [**operator>**](operator>.md) - comparison: greater than -- operator>= - comparison: greater than or equal +- [**operator>=**](operator>=.md) - comparison: greater than or equal ### Serialization
diff --git "a/doc/mkdocs/docs/api/basic_json/operator\074=.md" "b/doc/mkdocs/docs/api/basic_json/operator\074=.md" new file mode 100644 index 0000000..452ee49 --- /dev/null +++ "b/doc/mkdocs/docs/api/basic_json/operator\074=.md"
@@ -0,0 +1,59 @@ +# basic_json::operator<= + +```cpp +bool operator<=(const_reference lhs, const_reference rhs) noexcept, + +template<typename ScalarType> +bool operator<=(const_reference lhs, const ScalarType rhs) noexcept; + +template<typename ScalarType> +bool operator<=(ScalarType lhs, const const_reference rhs) noexcept; +``` + +Compares whether one JSON value `lhs` is less than or equal to another JSON value `rhs` by calculating +`#cpp !(rhs < lhs)`. + +## Template parameters + +`ScalarType` +: a scalar type according to `std::is_scalar<ScalarType>::value` + +## Parameters + +`lhs` (in) +: first value to consider + +`rhs` (in) +: second value to consider + +## Return value + +whether `lhs` is less than or equal to `rhs` + +## Exception safety + +No-throw guarantee: this function never throws exceptions. + +## Complexity + +Linear. + +## Example + +??? example + + The example demonstrates comparing several JSON types. + + ```cpp + --8<-- "examples/operator__lessequal.cpp" + ``` + + Output: + + ```json + --8<-- "examples/operator__lessequal.output" + ``` + +## Version history + +- Added in version 1.0.0.
diff --git "a/doc/mkdocs/docs/api/basic_json/operator\076=.md" "b/doc/mkdocs/docs/api/basic_json/operator\076=.md" new file mode 100644 index 0000000..19834c0 --- /dev/null +++ "b/doc/mkdocs/docs/api/basic_json/operator\076=.md"
@@ -0,0 +1,59 @@ +# basic_json::operator>= + +```cpp +bool operator>=(const_reference lhs, const_reference rhs) noexcept, + +template<typename ScalarType> +bool operator>=(const_reference lhs, const ScalarType rhs) noexcept; + +template<typename ScalarType> +bool operator>=(ScalarType lhs, const const_reference rhs) noexcept; +``` + +Compares whether one JSON value `lhs` is greater than or equal to another JSON value `rhs` by calculating +`#!cpp !(lhs < rhs)`. + +## Template parameters + +`ScalarType` +: a scalar type according to `std::is_scalar<ScalarType>::value` + +## Parameters + +`lhs` (in) +: first value to consider + +`rhs` (in) +: second value to consider + +## Return value + +whether `lhs` is less than or equal to `rhs` + +## Exception safety + +No-throw guarantee: this function never throws exceptions. + +## Complexity + +Linear. + +## Example + +??? example + + The example demonstrates comparing several JSON types. + + ```cpp + --8<-- "examples/operator__greaterequal.cpp" + ``` + + Output: + + ```json + --8<-- "examples/operator__greaterequal.output" + ``` + +## Version history + +- Added in version 1.0.0.
diff --git a/doc/mkdocs/mkdocs.yml b/doc/mkdocs/mkdocs.yml index 272ee5f..1bc365d 100644 --- a/doc/mkdocs/mkdocs.yml +++ b/doc/mkdocs/mkdocs.yml
@@ -147,7 +147,9 @@ - api/basic_json/operator==.md - api/basic_json/operator!=.md - api/basic_json/operator<.md + - api/basic_json/operator<=.md - api/basic_json/operator>.md + - api/basic_json/operator>=.md - api/basic_json/operator+=.md - api/basic_json/operator_literal_json.md - api/basic_json/operator_literal_json_pointer.md