From e3188897f8e2adcf3d846dd8116e8901fe3604d0 Mon Sep 17 00:00:00 2001 From: Niels Date: Tue, 24 Mar 2015 17:39:00 +0100 Subject: [PATCH] more on #48: allowing non-std begin/end functions --- src/json.hpp | 8 ++++++-- src/json.hpp.re2c | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/json.hpp b/src/json.hpp index b4443e9f..696e6eca 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -411,7 +411,9 @@ class basic_json { Allocator alloc; m_value.object = alloc.allocate(1); - alloc.construct(m_value.object, std::begin(value), std::end(value)); + using std::begin; + using std::end; + alloc.construct(m_value.object, begin(value), end(value)); } /// create an array (explicit) @@ -439,7 +441,9 @@ class basic_json { Allocator alloc; m_value.array = alloc.allocate(1); - alloc.construct(m_value.array, std::begin(value), std::end(value)); + using std::begin; + using std::end; + alloc.construct(m_value.array, begin(value), end(value)); } /// create a string (explicit) diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index 7537333e..a28b9eb0 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -411,7 +411,9 @@ class basic_json { Allocator alloc; m_value.object = alloc.allocate(1); - alloc.construct(m_value.object, std::begin(value), std::end(value)); + using std::begin; + using std::end; + alloc.construct(m_value.object, begin(value), end(value)); } /// create an array (explicit) @@ -439,7 +441,9 @@ class basic_json { Allocator alloc; m_value.array = alloc.allocate(1); - alloc.construct(m_value.array, std::begin(value), std::end(value)); + using std::begin; + using std::end; + alloc.construct(m_value.array, begin(value), end(value)); } /// create a string (explicit)