mirror of
https://github.com/nlohmann/json.git
synced 2025-08-07 18:02:57 +03:00
Fix char_traits deprecation warning (#4179)
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
|
||||
#include <nlohmann/detail/iterators/iterator_traits.hpp>
|
||||
#include <nlohmann/detail/macro_scope.hpp>
|
||||
#include <nlohmann/detail/meta/type_traits.hpp>
|
||||
|
||||
NLOHMANN_JSON_NAMESPACE_BEGIN
|
||||
namespace detail
|
||||
@@ -144,16 +145,16 @@ class iterator_input_adapter
|
||||
: current(std::move(first)), end(std::move(last))
|
||||
{}
|
||||
|
||||
typename std::char_traits<char_type>::int_type get_character()
|
||||
typename char_traits<char_type>::int_type get_character()
|
||||
{
|
||||
if (JSON_HEDLEY_LIKELY(current != end))
|
||||
{
|
||||
auto result = std::char_traits<char_type>::to_int_type(*current);
|
||||
auto result = char_traits<char_type>::to_int_type(*current);
|
||||
std::advance(current, 1);
|
||||
return result;
|
||||
}
|
||||
|
||||
return std::char_traits<char_type>::eof();
|
||||
return char_traits<char_type>::eof();
|
||||
}
|
||||
|
||||
private:
|
||||
|
Reference in New Issue
Block a user