mirror of
https://github.com/nlohmann/json.git
synced 2024-12-26 23:27:53 +08:00
80df5e8de6
The previous version relied on the existence of an 'iterator' type. As mentioned in comments, this is not the proper way to do it and causes issues with certain types (e.g. views from range-v3). Add a 'is_range' trait that properly detects the return type of 'begin'/'end', and use it in instead.
9 lines
143 B
C++
9 lines
143 B
C++
#pragma once
|
|
|
|
#include <nlohmann/detail/macro_scope.hpp>
|
|
|
|
namespace nlohmann
|
|
{
|
|
NLOHMANN_CAN_CALL_STD_FUNC_IMPL(begin);
|
|
} // namespace nlohmann
|