From 6f2da1a39a9f9d22794c54b4bef98fc802967ef7 Mon Sep 17 00:00:00 2001 From: Niels Date: Thu, 13 Aug 2015 10:24:28 +0200 Subject: [PATCH] try to avoid MSVC bug (https://connect.microsoft.com/VisualStudio/feedback/details/797682/c-decltype-of-class-member-access-incompletely-implemented) --- src/json.hpp | 2 +- src/json.hpp.re2c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/json.hpp b/src/json.hpp index 61b18f10..993d12e2 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -5702,7 +5702,7 @@ class basic_json /// the container to iterate basic_json& container; /// the type of the iterator to use while iteration - using json_iterator = decltype(container.begin()); + using json_iterator = decltype(std::begin(container)); /// internal iterator wrapper class iterator_wrapper_internal diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index 2f01c007..8c24f58e 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -5702,7 +5702,7 @@ class basic_json /// the container to iterate basic_json& container; /// the type of the iterator to use while iteration - using json_iterator = decltype(container.begin()); + using json_iterator = decltype(std::begin(container)); /// internal iterator wrapper class iterator_wrapper_internal