mirror of
https://github.com/nlohmann/json.git
synced 2026-08-20 16:13:19 +00:00
Fix the SentinelType example on iterator_input_adapter
The comment offered "a C++20 sentinel or counted_iterator" as examples of a SentinelType, but std::counted_iterator is the IteratorType - the sentinel it pairs with is std::default_sentinel_t. #5268 corrected the same wording in the API documentation and left the code comment behind. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
@@ -7158,8 +7158,9 @@ class input_stream_adapter
|
||||
|
||||
// General-purpose iterator-based adapter. It might not be as fast as
|
||||
// theoretically possible for some containers, but it is extremely versatile.
|
||||
// SentinelType defaults to IteratorType for backward compatibility, but may
|
||||
// be a different type (e.g., a C++20 sentinel or counted_iterator).
|
||||
// SentinelType defaults to IteratorType for backward compatibility, but may be
|
||||
// a different type, e.g. a C++20 sentinel such as std::default_sentinel_t when
|
||||
// IteratorType is a std::counted_iterator.
|
||||
template<typename IteratorType, typename SentinelType = IteratorType>
|
||||
class iterator_input_adapter
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user