Add operator<<(json_pointer)
Fixes #3600.
{"label": "nlohmann:develop", "ref": "develop", "sha": "2d48a4d9c5e8f0a5ce914922eb2a45dc0ec93ee3"}
### Description

Example https://github.com/nlohmann/json/blob/develop/docs/examples/json_pointer__pop_back.cpp does not compile.

It used to compile. Not sure when this broke.

### Reproduction steps

Call

```sh
make -C docs
```

### Expected vs. actual results

Expected: code compiles

Actual:

GCC:

```
examples/json_pointer__back.cpp: In function 'int main()':
examples/json_pointer__back.cpp:13:45: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'nlohmann::basic_json<>::json_pointer' {aka 'nlohmann::json_pointer<std::__cxx11::basic_string<char> >'})
   13 |     std::cout << "last reference token of " << ptr1 << " is " << ptr1.back() << '\n'
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~ ~~~~
      |               |                                |
      |               std::basic_ostream<char>         nlohmann::basic_json<>::json_pointer {aka nlohmann::json_pointer<std::__cxx11::basic_string<char> >}
```

Clang:

```
examples/json_pointer__back.cpp:13:45: error: invalid operands to binary expression ('basic_ostream<char, std::char_traits<char>>' and 'json::json_pointer' (aka 'json_pointer<std::string>'))
    std::cout << "last reference token of " << ptr1 << " is " << ptr1.back() << '\n'
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~
```

### Minimal code example

_No response_

### Error messages

_No response_

### Compiler and operating system

Apple clang version 13.1.6 (clang-1316.0.21.2.5) and g++-11 (Homebrew GCC 11.3.0_2) 11.3.0

### Library version

develop

### Validation

- [X] The bug also occurs if the latest version from the [`develop`](https://github.com/nlohmann/json/tree/develop) branch is used.
- [X] I can successfully [compile and run the unit tests](https://github.com/nlohmann/json#execute-unit-tests).
json_pointer__pop_back.cpp example does not compile
diff --git a/docs/examples/json_pointer__operator_string.cpp b/docs/examples/json_pointer__operator_string_t.cpp
similarity index 100%
rename from docs/examples/json_pointer__operator_string.cpp
rename to docs/examples/json_pointer__operator_string_t.cpp
diff --git a/docs/examples/json_pointer__operator_string.output b/docs/examples/json_pointer__operator_string_t.output
similarity index 100%
rename from docs/examples/json_pointer__operator_string.output
rename to docs/examples/json_pointer__operator_string_t.output
diff --git a/docs/examples/operator_serialize.cpp b/docs/examples/operator_ltlt__basic_json.cpp
similarity index 100%
rename from docs/examples/operator_serialize.cpp
rename to docs/examples/operator_ltlt__basic_json.cpp
diff --git a/docs/examples/operator_serialize.output b/docs/examples/operator_ltlt__basic_json.output
similarity index 100%
rename from docs/examples/operator_serialize.output
rename to docs/examples/operator_ltlt__basic_json.output
diff --git a/docs/examples/operator_ltlt__json_pointer.cpp b/docs/examples/operator_ltlt__json_pointer.cpp
new file mode 100644
index 0000000000..f4fac886d6
--- /dev/null
+++ b/docs/examples/operator_ltlt__json_pointer.cpp
@@ -0,0 +1,13 @@
+#include <iostream>
+#include <nlohmann/json.hpp>
+
+using json = nlohmann::json;
+
+int main()
+{
+    // create JSON poiner
+    json::json_pointer ptr("/foo/bar/baz");
+
+    // write string representation to stream
+    std::cout << ptr << std::endl;
+}
diff --git a/docs/examples/operator_ltlt__json_pointer.output b/docs/examples/operator_ltlt__json_pointer.output
new file mode 100644
index 0000000000..ed359432d2
--- /dev/null
+++ b/docs/examples/operator_ltlt__json_pointer.output
@@ -0,0 +1,1 @@
+/foo/bar/baz
diff --git a/docs/mkdocs/docs/api/basic_json/accept.md b/docs/mkdocs/docs/api/basic_json/accept.md
index 097cc8c914..1c806e82f4 100644
--- a/docs/mkdocs/docs/api/basic_json/accept.md
+++ b/docs/mkdocs/docs/api/basic_json/accept.md
@@ -96,7 +96,7 @@ Linear in the length of the input. The parser is a predictive LL(1) parser.
 ## See also
 
 - [parse](parse.md) - deserialize from a compatible input
-- [operator>>](operator_gtgt.md) - deserialize from stream
+- [operator>>](../operator_gtgt.md) - deserialize from stream
 
 ## Version history
 
diff --git a/docs/mkdocs/docs/api/basic_json/index.md b/docs/mkdocs/docs/api/basic_json/index.md
index 14f6d56c2b..35ce63c3e1 100644
--- a/docs/mkdocs/docs/api/basic_json/index.md
+++ b/docs/mkdocs/docs/api/basic_json/index.md
@@ -283,8 +283,8 @@ Access to the JSON value
 
 ## Non-member functions
 
-- [**operator<<(std::ostream&)**](operator_ltlt.md) - serialize to stream
-- [**operator>>(std::istream&)**](operator_gtgt.md) - deserialize from stream
+- [**operator<<(std::ostream&)**](../operator_ltlt.md) - serialize to stream
+- [**operator>>(std::istream&)**](../operator_gtgt.md) - deserialize from stream
 - [**to_string**](to_string.md) - user-defined `to_string` function for JSON values
 
 ## Literals
diff --git a/docs/mkdocs/docs/api/basic_json/operator_ltlt.md b/docs/mkdocs/docs/api/basic_json/operator_ltlt.md
deleted file mode 100644
index 0cba5ea3c6..0000000000
--- a/docs/mkdocs/docs/api/basic_json/operator_ltlt.md
+++ /dev/null
@@ -1,62 +0,0 @@
-# operator<<(basic_json)
-
-```cpp
-std::ostream& operator<<(std::ostream& o, const basic_json& j);
-```
-
-Serialize the given JSON value `j` to the output stream `o`. The JSON value will be serialized using the
-[`dump`](dump.md) member function.
-
-- The indentation of the output can be controlled with the member variable `width` of the output stream `o`. For
-  instance, using the manipulator `std::setw(4)` on `o` sets the indentation level to `4` and the serialization result
-  is the same as calling `dump(4)`.
-- The indentation character can be controlled with the member variable `fill` of the output stream `o`. For instance,
-  the manipulator `std::setfill('\\t')` sets indentation to use a tab character rather than the default space character.
-
-## Parameters
-
-`o` (in, out)
-:   stream to serialize to
-
-`j` (in)
-:   JSON value to serialize
-
-## Return value
-
-the stream `o`
-
-## Exceptions
-
-Throws [`type_error.316`](../../home/exceptions.md#jsonexceptiontype_error316) if a string stored inside the JSON value
-is not UTF-8 encoded. Note that unlike the [`dump`](dump.md) member functions, no `error_handler` can be set.
-
-## Complexity
-
-Linear.
-
-## Examples
-
-??? example
-
-    The example below shows the serialization with different parameters to `width` to adjust the indentation level.
-        
-    ```cpp
-    --8<-- "examples/operator_serialize.cpp"
-    ```
-    
-    Output:
-    
-    ```json
-    --8<-- "examples/operator_serialize.output"
-    ```
-
-## Version history
-
-- Added in version 1.0.0
-- Support for indentation character added in version 3.0.0.
-
-!!! warning "Deprecation"
-
-    This function replaces function `#!cpp std::ostream& operator>>(const basic_json& j, std::ostream& o)` which has
-    been deprecated in version 3.0.0. It will be removed in version 4.0.0. Please replace calls like `#!cpp j >> o;`
-    with `#!cpp o << j;`.
diff --git a/docs/mkdocs/docs/api/basic_json/parse.md b/docs/mkdocs/docs/api/basic_json/parse.md
index e0aaf956ba..49838ad1d4 100644
--- a/docs/mkdocs/docs/api/basic_json/parse.md
+++ b/docs/mkdocs/docs/api/basic_json/parse.md
@@ -196,7 +196,7 @@ super-linear complexity.
 ## See also
 
 - [accept](accept.md) - check if the input is valid JSON
-- [operator>>](operator_gtgt.md) - deserialize from stream
+- [operator>>](../operator_gtgt.md) - deserialize from stream
 
 ## Version history
 
diff --git a/docs/mkdocs/docs/api/json_pointer/index.md b/docs/mkdocs/docs/api/json_pointer/index.md
index dc07d89b32..aee845cded 100644
--- a/docs/mkdocs/docs/api/json_pointer/index.md
+++ b/docs/mkdocs/docs/api/json_pointer/index.md
@@ -28,7 +28,7 @@ are the base for JSON patches.
 
 - [(constructor)](json_pointer.md)
 - [**to_string**](to_string.md) - return a string representation of the JSON pointer
-- [**operator string_t**](operator_string.md) - return a string representation of the JSON pointer
+- [**operator string_t**](operator_string_t.md) - return a string representation of the JSON pointer
 - [**operator/=**](operator_slasheq.md) - append to the end of the JSON pointer
 - [**operator/**](operator_slash.md) - create JSON Pointer by appending
 - [**parent_pointer**](parent_pointer.md) - returns the parent of this JSON pointer
diff --git a/docs/mkdocs/docs/api/json_pointer/operator_string.md b/docs/mkdocs/docs/api/json_pointer/operator_string_t.md
similarity index 59%
rename from docs/mkdocs/docs/api/json_pointer/operator_string.md
rename to docs/mkdocs/docs/api/json_pointer/operator_string_t.md
index f2f99cae7a..74105a4f1e 100644
--- a/docs/mkdocs/docs/api/json_pointer/operator_string.md
+++ b/docs/mkdocs/docs/api/json_pointer/operator_string_t.md
@@ -19,6 +19,13 @@ operator string_t() const
 }
 ```
 
+## Notes
+
+!!! warning "Deprecation"
+
+    This function is deprecated in favor of [`to_string`](to_string.md) and will be removed in a future major version
+    release.
+
 ## Examples
 
 ??? example
@@ -26,16 +33,16 @@ operator string_t() const
     The example shows how JSON Pointers can be implicitly converted to strings.
      
     ```cpp
-    --8<-- "examples/json_pointer__operator_string.cpp"
+    --8<-- "examples/json_pointer__operator_string_t.cpp"
     ```
     
     Output:
     
     ```json
-    --8<-- "examples/json_pointer__operator_string.output"
+    --8<-- "examples/json_pointer__operator_string_t.output"
     ```
 
 ## Version history
 
 - Since version 2.0.0.
-- Changed type to `string_t` in version 3.11.0.
+- Changed type to `string_t` and deprecated in version 3.11.0.
diff --git a/docs/mkdocs/docs/api/basic_json/operator_gtgt.md b/docs/mkdocs/docs/api/operator_gtgt.md
similarity index 65%
rename from docs/mkdocs/docs/api/basic_json/operator_gtgt.md
rename to docs/mkdocs/docs/api/operator_gtgt.md
index 97c2f0b4e6..98d575add4 100644
--- a/docs/mkdocs/docs/api/basic_json/operator_gtgt.md
+++ b/docs/mkdocs/docs/api/operator_gtgt.md
@@ -1,4 +1,4 @@
-# operator>>(basic_json)
+# <small>nlohmann::</small>operator>>(basic_json)
 
 ```cpp
 std::istream& operator>>(std::istream& i, basic_json& j);
@@ -20,10 +20,10 @@ the stream `i`
 
 ## Exceptions
 
-- Throws [`parse_error.101`](../../home/exceptions.md#jsonexceptionparse_error101) in case of an unexpected token.
-- Throws [`parse_error.102`](../../home/exceptions.md#jsonexceptionparse_error102) if to_unicode fails or surrogate 
+- Throws [`parse_error.101`](../home/exceptions.md#jsonexceptionparse_error101) in case of an unexpected token.
+- Throws [`parse_error.102`](../home/exceptions.md#jsonexceptionparse_error102) if to_unicode fails or surrogate 
   error.
-- Throws [`parse_error.103`](../../home/exceptions.md#jsonexceptionparse_error103) if to_unicode fails.
+- Throws [`parse_error.103`](../home/exceptions.md#jsonexceptionparse_error103) if to_unicode fails.
 
 ## Complexity
 
@@ -33,6 +33,12 @@ Linear in the length of the input. The parser is a predictive LL(1) parser.
 
 A UTF-8 byte order mark is silently ignored.
 
+!!! warning "Deprecation"
+
+    This function replaces function `#!cpp std::istream& operator<<(basic_json& j, std::istream& i)` which has
+    been deprecated in version 3.0.0. It will be removed in version 4.0.0. Please replace calls like `#!cpp j << i;`
+    with `#!cpp i >> j;`.
+
 ## Examples
 
 ??? example
@@ -51,15 +57,9 @@ A UTF-8 byte order mark is silently ignored.
 
 ## See also
 
-- [accept](accept.md) - check if the input is valid JSON
-- [parse](parse.md) - deserialize from a compatible input
+- [accept](basic_json/accept.md) - check if the input is valid JSON
+- [parse](basic_json/parse.md) - deserialize from a compatible input
 
 ## Version history
 
-- Added in version 1.0.0
-
-!!! warning "Deprecation"
-
-    This function replaces function `#!cpp std::istream& operator<<(basic_json& j, std::istream& i)` which has
-    been deprecated in version 3.0.0. It will be removed in version 4.0.0. Please replace calls like `#!cpp j << i;`
-    with `#!cpp i >> j;`.
+- Added in version 1.0.0. Deprecated in version 3.0.0.
diff --git a/docs/mkdocs/docs/api/operator_ltlt.md b/docs/mkdocs/docs/api/operator_ltlt.md
new file mode 100644
index 0000000000..ea857718b7
--- /dev/null
+++ b/docs/mkdocs/docs/api/operator_ltlt.md
@@ -0,0 +1,86 @@
+# <small>nlohmann::</small>operator<<(basic_json), <small>nlohmann::</small>operator<<(json_pointer)
+
+```cpp
+std::ostream& operator<<(std::ostream& o, const basic_json& j);      // (1)
+
+std::ostream& operator<<(std::ostream& o, const json_pointer& ptr);  // (2)
+```
+
+1. Serialize the given JSON value `j` to the output stream `o`. The JSON value will be serialized using the
+   [`dump`](basic_json/dump.md) member function.
+    - The indentation of the output can be controlled with the member variable `width` of the output stream `o`. For
+      instance, using the manipulator `std::setw(4)` on `o` sets the indentation level to `4` and the serialization
+      result is the same as calling `dump(4)`.
+    - The indentation character can be controlled with the member variable `fill` of the output stream `o`.
+      For instance, the manipulator `std::setfill('\\t')` sets indentation to use a tab character rather than the
+      default space character.
+2. Write a string representation of the given JSON pointer `ptr` to the output stream `o`. The string representation is
+   obtained using the [`to_string`](json_pointer/to_string.md) member function.
+
+## Parameters
+
+`o` (in, out)
+:   stream to write to
+
+`j` (in)
+:   JSON value to serialize
+
+`ptr` (in)
+:   JSON pointer to write
+
+## Return value
+
+the stream `o`
+
+## Exceptions
+
+1. Throws [`type_error.316`](../home/exceptions.md#jsonexceptiontype_error316) if a string stored inside the JSON
+   value is not UTF-8 encoded. Note that unlike the [`dump`](basic_json/dump.md) member functions, no `error_handler` can be set.
+2. None.
+
+## Complexity
+
+Linear.
+
+## Notes
+
+!!! warning "Deprecation"
+
+    Function  `#!cpp std::ostream& operator<<(std::ostream& o, const basic_json& j)` replaces function
+    `#!cpp std::ostream& operator>>(const basic_json& j, std::ostream& o)` which has been deprecated in version 3.0.0.
+    It will be removed in version 4.0.0. Please replace calls like `#!cpp j >> o;` with `#!cpp o << j;`.
+
+## Examples
+
+??? example "Example: (1) serialize JSON value to stream"
+
+    The example below shows the serialization with different parameters to `width` to adjust the indentation level.
+    
+    ```cpp
+    --8<-- "examples/operator_ltlt__basic_json.cpp"
+    ```
+    
+    Output:
+    
+    ```json
+    --8<-- "examples/operator_ltlt__basic_json.output"
+    ```
+
+??? example "Example: (2) write JSON pointer to stream"
+
+    The example below shows how to write a JSON pointer to a stream.
+    
+    ```cpp
+    --8<-- "examples/operator_ltlt__json_pointer.cpp"
+    ```
+    
+    Output:
+    
+    ```json
+    --8<-- "examples/operator_ltlt__json_pointer.output"
+    ```
+## Version history
+
+1. Added in version 1.0.0. Added support for indentation character and deprecated
+   `#!cpp std::ostream& operator>>(const basic_json& j, std::ostream& o)` in version 3.0.0.
+3. Added in version 3.11.0.
diff --git a/docs/mkdocs/docs/features/parsing/json_lines.md b/docs/mkdocs/docs/features/parsing/json_lines.md
index 69c2163b78..659d317927 100644
--- a/docs/mkdocs/docs/features/parsing/json_lines.md
+++ b/docs/mkdocs/docs/features/parsing/json_lines.md
@@ -36,7 +36,7 @@ JSON Lines input with more than one value is treated as invalid JSON by the [`pa
 
 !!! warning "Note"
 
-    Using [`operator>>`](../../api/basic_json/operator_gtgt.md) like
+    Using [`operator>>`](../../api/operator_gtgt.md) like
     
     ```cpp
     json j;
diff --git a/docs/mkdocs/mkdocs.yml b/docs/mkdocs/mkdocs.yml
index fe822b0c80..8b7dc4762b 100644
--- a/docs/mkdocs/mkdocs.yml
+++ b/docs/mkdocs/mkdocs.yml
@@ -162,8 +162,6 @@ nav:
         - 'operator<=': api/basic_json/operator_le.md
         - 'operator>=': api/basic_json/operator_ge.md
         - 'operator<=>': api/basic_json/operator_spaceship.md
-        - 'operator<<': api/basic_json/operator_ltlt.md
-        - 'operator>>': api/basic_json/operator_gtgt.md
         - 'operator""_json': api/basic_json/operator_literal_json.md
         - 'operator""_json_pointer': api/basic_json/operator_literal_json_pointer.md
         - 'out_of_range': api/basic_json/out_of_range.md
@@ -212,7 +210,7 @@ nav:
         - '(Constructor)': api/json_pointer/json_pointer.md
         - 'back': api/json_pointer/back.md
         - 'empty': api/json_pointer/empty.md
-        - 'operator std::string': api/json_pointer/operator_string.md
+        - 'operator string_t': api/json_pointer/operator_string_t.md
         - 'operator/': api/json_pointer/operator_slash.md
         - 'operator/=': api/json_pointer/operator_slasheq.md
         - 'parent_pointer': api/json_pointer/parent_pointer.md
@@ -235,6 +233,9 @@ nav:
         - 'start_array': api/json_sax/start_array.md
         - 'start_object': api/json_sax/start_object.md
         - 'string': api/json_sax/string.md
+      - 'operator<<(basic_json)': api/operator_ltlt.md
+      - 'operator<<(json_pointer)': api/operator_ltlt.md
+      - 'operator>>(basic_json)': api/operator_gtgt.md
       - 'ordered_json': api/ordered_json.md
       - 'ordered_map': api/ordered_map.md
       - macros:
@@ -324,6 +325,11 @@ plugins:
     - minify:
         minify_html: true
     - git-revision-date-localized
+    - redirects:
+        redirect_maps:
+            'api/basic_json/operator_gtgt.md': api/operator_gtgt.md
+            'api/basic_json/operator_ltlt.md': api/operator_ltlt.md
+            'api/json_pointer/operator_string.md': api/json_pointer/operator_string_t.md
 
 extra_css:
     - css/custom.css
diff --git a/docs/mkdocs/requirements.txt b/docs/mkdocs/requirements.txt
index aa9fcaf0e2..51fceb5d3d 100644
--- a/docs/mkdocs/requirements.txt
+++ b/docs/mkdocs/requirements.txt
@@ -25,6 +25,7 @@ mkdocs-git-revision-date-localized-plugin==1.0.1
 mkdocs-material==8.2.10
 mkdocs-material-extensions==1.0.3
 mkdocs-minify-plugin==0.5.0
+mkdocs-redirects==1.0.4
 mkdocs-simple-hooks==0.1.5
 nltk==3.7
 packaging==21.3
diff --git a/include/nlohmann/detail/json_pointer.hpp b/include/nlohmann/detail/json_pointer.hpp
index 35e1ddbc55..79776bcc6b 100644
--- a/include/nlohmann/detail/json_pointer.hpp
+++ b/include/nlohmann/detail/json_pointer.hpp
@@ -12,6 +12,9 @@
 #include <cctype> // isdigit
 #include <cerrno> // errno, ERANGE
 #include <cstdlib> // strtoull
+#ifndef JSON_NO_IO
+    #include <iosfwd> // ostream
+#endif  // JSON_NO_IO
 #include <limits> // max
 #include <numeric> // accumulate
 #include <string> // string
@@ -75,11 +78,22 @@ class json_pointer
 
     /// @brief return a string representation of the JSON pointer
     /// @sa https://json.nlohmann.me/api/json_pointer/operator_string/
+    JSON_HEDLEY_DEPRECATED_FOR(3.11.0, to_string())
     operator string_t() const
     {
         return to_string();
     }
 
+#ifndef JSON_NO_IO
+    /// @brief write string representation of the JSON pointer to stream
+    /// @sa https://json.nlohmann.me/api/basic_json/operator_ltlt/
+    friend std::ostream& operator<<(std::ostream& o, const json_pointer& ptr)
+    {
+        o << ptr.to_string();
+        return o;
+    }
+#endif
+
     /// @brief append another JSON pointer at the end of this JSON pointer
     /// @sa https://json.nlohmann.me/api/json_pointer/operator_slasheq/
     json_pointer& operator/=(const json_pointer& ptr)
diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp
index dd9c39fb50..1d21f71b76 100644
--- a/single_include/nlohmann/json.hpp
+++ b/single_include/nlohmann/json.hpp
@@ -13455,6 +13455,9 @@ class json_reverse_iterator : public std::reverse_iterator<Base>
 #include <cctype> // isdigit
 #include <cerrno> // errno, ERANGE
 #include <cstdlib> // strtoull
+#ifndef JSON_NO_IO
+    #include <iosfwd> // ostream
+#endif  // JSON_NO_IO
 #include <limits> // max
 #include <numeric> // accumulate
 #include <string> // string
@@ -13523,11 +13526,22 @@ class json_pointer
 
     /// @brief return a string representation of the JSON pointer
     /// @sa https://json.nlohmann.me/api/json_pointer/operator_string/
+    JSON_HEDLEY_DEPRECATED_FOR(3.11.0, to_string())
     operator string_t() const
     {
         return to_string();
     }
 
+#ifndef JSON_NO_IO
+    /// @brief write string representation of the JSON pointer to stream
+    /// @sa https://json.nlohmann.me/api/basic_json/operator_ltlt/
+    friend std::ostream& operator<<(std::ostream& o, const json_pointer& ptr)
+    {
+        o << ptr.to_string();
+        return o;
+    }
+#endif
+
     /// @brief append another JSON pointer at the end of this JSON pointer
     /// @sa https://json.nlohmann.me/api/json_pointer/operator_slasheq/
     json_pointer& operator/=(const json_pointer& ptr)

diff --git a/tests/src/unit-json_pointer.cpp b/tests/src/unit-json_pointer.cpp
index 50a1f1ce9b..977af9f6e8 100644
--- a/tests/src/unit-json_pointer.cpp
+++ b/tests/src/unit-json_pointer.cpp
@@ -12,6 +12,8 @@
 #include <nlohmann/json.hpp>
 using nlohmann::json;
 
+#include <sstream>
+
 TEST_CASE("JSON pointers")
 {
     SECTION("errors")
@@ -475,12 +477,16 @@ TEST_CASE("JSON pointers")
 
     SECTION("string representation")
     {
-        for (const auto* ptr :
+        for (const auto* ptr_str :
                 {"", "/foo", "/foo/0", "/", "/a~1b", "/c%d", "/e^f", "/g|h", "/i\\j", "/k\"l", "/ ", "/m~0n"
                 })
         {
-            CHECK(json::json_pointer(ptr).to_string() == ptr);
-            CHECK(std::string(json::json_pointer(ptr)) == ptr);
+            json::json_pointer ptr(ptr_str);
+            std::stringstream ss;
+            ss << ptr;
+            CHECK(ptr.to_string() == ptr_str);
+            CHECK(std::string(ptr) == ptr_str);
+            CHECK(ss.str() == ptr_str);
         }
     }
 

{"test-cbor_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-regression1_cpp17": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-regression1_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-comparison_legacy_cpp20": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-testsuites_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-ubjson_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_import_build": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-element_access1_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_fetch_content2_configure": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-convenience_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_fetch_content2_build": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-conversions_cpp17": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-disabled_exceptions_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-byte_container_with_subtype_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-large_json_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_import_minver_build": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-class_parser_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_add_subdirectory_configure": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-bson_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-comparison_cpp20": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-comparison_legacy_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-udt_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-class_iterator_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-binary_formats_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-meta_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-items_cpp17": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-iterators1_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-user_defined_input_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_fetch_content_configure": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-merge_patch_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-json_pointer_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-diagnostics_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-regression2_cpp20": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-pointer_access_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-iterators2_cpp20": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-unicode1_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-comparison_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-reference_access_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-element_access2_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-iterators2_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_fetch_content_build": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-unicode3_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-ordered_map_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-element_access2_cpp17": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "download_test_data": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-json_patch_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-alt-string_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-modifiers_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-noexcept_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-conversions_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_target_include_directories_configure": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-deserialization_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-wstring_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-constructor2_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_import_minver_configure": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-msgpack_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-items_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-class_lexer_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-to_chars_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-class_const_iterator_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_target_include_directories_build": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-inspection_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-unicode5_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-udt_macro_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-readme_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-unicode2_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-ordered_json_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-regression2_cpp17": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-capacity_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-hash_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-allocator_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-constructor1_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-bjdata_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-algorithms_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-unicode4_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-regression2_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-serialization_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_import_configure": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-concepts_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-assert_macro_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_add_subdirectory_build": {"run": "PASS", "test": "NONE", "fix": "PASS"}}
{"test-cbor_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-regression1_cpp17": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-regression1_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-comparison_legacy_cpp20": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-testsuites_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-ubjson_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_import_build": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-element_access1_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_fetch_content2_configure": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-convenience_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_fetch_content2_build": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-conversions_cpp17": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-disabled_exceptions_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-byte_container_with_subtype_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-large_json_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_import_minver_build": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-class_parser_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_add_subdirectory_configure": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-bson_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-comparison_cpp20": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-comparison_legacy_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-udt_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-class_iterator_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-binary_formats_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-meta_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-items_cpp17": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-iterators1_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-user_defined_input_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_fetch_content_configure": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-merge_patch_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-json_pointer_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-diagnostics_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-regression2_cpp20": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-pointer_access_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-iterators2_cpp20": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-unicode1_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-comparison_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-reference_access_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-element_access2_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-iterators2_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_fetch_content_build": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-unicode3_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-ordered_map_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-element_access2_cpp17": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "download_test_data": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-json_patch_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-alt-string_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-modifiers_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-noexcept_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-conversions_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_target_include_directories_configure": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-deserialization_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-wstring_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-constructor2_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_import_minver_configure": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-msgpack_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-items_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-class_lexer_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-to_chars_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-class_const_iterator_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_target_include_directories_build": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-inspection_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-unicode5_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-udt_macro_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-readme_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-unicode2_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-ordered_json_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-regression2_cpp17": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-capacity_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-hash_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-allocator_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-constructor1_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-bjdata_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-algorithms_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-unicode4_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-regression2_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-serialization_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_import_configure": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-concepts_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "test-assert_macro_cpp11": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "cmake_add_subdirectory_build": {"run": "PASS", "test": "NONE", "fix": "PASS"}}
{"passed_count": 81, "failed_count": 0, "skipped_count": 0, "passed_tests": ["test-comparison_legacy_cpp20", "test-testsuites_cpp11", "test-ubjson_cpp11", "cmake_fetch_content2_configure", "test-convenience_cpp11", "cmake_fetch_content2_build", "test-conversions_cpp17", "test-disabled_exceptions_cpp11", "cmake_import_minver_build", "test-class_parser_cpp11", "cmake_add_subdirectory_configure", "test-bson_cpp11", "test-comparison_cpp20", "test-comparison_legacy_cpp11", "test-udt_cpp11", "test-class_iterator_cpp11", "test-merge_patch_cpp11", "test-diagnostics_cpp11", "test-pointer_access_cpp11", "test-comparison_cpp11", "test-element_access2_cpp11", "cmake_fetch_content_build", "test-element_access2_cpp17", "download_test_data", "test-alt-string_cpp11", "test-wstring_cpp11", "test-constructor2_cpp11", "cmake_import_minver_configure", "test-msgpack_cpp11", "test-items_cpp11", "test-unicode5_cpp11", "test-udt_macro_cpp11", "test-unicode2_cpp11", "test-ordered_json_cpp11", "test-regression2_cpp17", "test-capacity_cpp11", "test-allocator_cpp11", "test-constructor1_cpp11", "test-bjdata_cpp11", "test-regression2_cpp11", "test-serialization_cpp11", "test-concepts_cpp11", "cmake_add_subdirectory_build", "test-cbor_cpp11", "test-regression1_cpp17", "test-regression1_cpp11", "cmake_import_build", "test-element_access1_cpp11", "test-byte_container_with_subtype_cpp11", "test-binary_formats_cpp11", "test-meta_cpp11", "test-items_cpp17", "test-iterators1_cpp11", "test-user_defined_input_cpp11", "cmake_fetch_content_configure", "test-json_pointer_cpp11", "test-regression2_cpp20", "test-iterators2_cpp20", "test-unicode1_cpp11", "test-reference_access_cpp11", "test-iterators2_cpp11", "test-unicode3_cpp11", "test-ordered_map_cpp11", "test-json_patch_cpp11", "test-modifiers_cpp11", "test-noexcept_cpp11", "test-conversions_cpp11", "cmake_target_include_directories_configure", "test-deserialization_cpp11", "test-class_lexer_cpp11", "test-to_chars_cpp11", "test-class_const_iterator_cpp11", "cmake_target_include_directories_build", "test-inspection_cpp11", "test-readme_cpp11", "test-hash_cpp11", "test-algorithms_cpp11", "test-unicode4_cpp11", "cmake_import_configure", "test-assert_macro_cpp11", "test-large_json_cpp11"], "failed_tests": [], "skipped_tests": []}
{"passed_count": 0, "failed_count": 0, "skipped_count": 0, "passed_tests": [], "failed_tests": [], "skipped_tests": []}
{"passed_count": 81, "failed_count": 0, "skipped_count": 0, "passed_tests": ["test-comparison_legacy_cpp20", "test-testsuites_cpp11", "test-ubjson_cpp11", "cmake_fetch_content2_configure", "test-convenience_cpp11", "cmake_fetch_content2_build", "test-conversions_cpp17", "test-disabled_exceptions_cpp11", "cmake_import_minver_build", "test-class_parser_cpp11", "cmake_add_subdirectory_configure", "test-bson_cpp11", "test-comparison_cpp20", "test-comparison_legacy_cpp11", "test-udt_cpp11", "test-class_iterator_cpp11", "test-merge_patch_cpp11", "test-diagnostics_cpp11", "test-pointer_access_cpp11", "test-comparison_cpp11", "test-element_access2_cpp11", "cmake_fetch_content_build", "test-element_access2_cpp17", "download_test_data", "test-alt-string_cpp11", "test-wstring_cpp11", "test-constructor2_cpp11", "cmake_import_minver_configure", "test-msgpack_cpp11", "test-items_cpp11", "test-unicode5_cpp11", "test-udt_macro_cpp11", "test-unicode2_cpp11", "test-ordered_json_cpp11", "test-regression2_cpp17", "test-capacity_cpp11", "test-allocator_cpp11", "test-constructor1_cpp11", "test-bjdata_cpp11", "test-regression2_cpp11", "test-serialization_cpp11", "test-concepts_cpp11", "cmake_add_subdirectory_build", "test-cbor_cpp11", "test-regression1_cpp17", "test-regression1_cpp11", "cmake_import_build", "test-element_access1_cpp11", "test-byte_container_with_subtype_cpp11", "test-binary_formats_cpp11", "test-meta_cpp11", "test-items_cpp17", "test-iterators1_cpp11", "test-user_defined_input_cpp11", "cmake_fetch_content_configure", "test-json_pointer_cpp11", "test-regression2_cpp20", "test-iterators2_cpp20", "test-unicode1_cpp11", "test-reference_access_cpp11", "test-iterators2_cpp11", "test-unicode3_cpp11", "test-ordered_map_cpp11", "test-json_patch_cpp11", "test-modifiers_cpp11", "test-noexcept_cpp11", "test-conversions_cpp11", "cmake_target_include_directories_configure", "test-deserialization_cpp11", "test-class_lexer_cpp11", "test-to_chars_cpp11", "test-class_const_iterator_cpp11", "cmake_target_include_directories_build", "test-inspection_cpp11", "test-readme_cpp11", "test-hash_cpp11", "test-algorithms_cpp11", "test-unicode4_cpp11", "cmake_import_configure", "test-assert_macro_cpp11", "test-large_json_cpp11"], "failed_tests": [], "skipped_tests": []}