From abc6137001da7d3f45eaa2a2a9c46e6e165236e0 Mon Sep 17 00:00:00 2001 From: Niels Date: Sun, 22 Mar 2015 17:30:48 +0100 Subject: [PATCH] fixed #48 (using nonmember begin/end) --- src/json.hpp | 9 +++++---- src/json.hpp.re2c | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/json.hpp b/src/json.hpp index fbb7b502..3aad611b 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -410,7 +410,7 @@ class basic_json { Allocator alloc; m_value.object = alloc.allocate(1); - alloc.construct(m_value.object, value.begin(), value.end()); + alloc.construct(m_value.object, std::begin(value), std::end(value)); } /// create an array (explicit) @@ -438,7 +438,7 @@ class basic_json { Allocator alloc; m_value.array = alloc.allocate(1); - alloc.construct(m_value.array, value.begin(), value.end()); + alloc.construct(m_value.array, std::begin(value), std::end(value)); } /// create a string (explicit) @@ -3067,7 +3067,8 @@ class basic_json @see */ - inline static string_t to_unicode(const size_t codepoint1, const size_t codepoint2 = 0) + inline static string_t to_unicode(const size_t codepoint1, + const size_t codepoint2 = 0) { string_t result; @@ -3095,7 +3096,7 @@ class basic_json if (codepoint <= 0x7f) { - // 1-byte characters: 0xxxxxxx (ASCI) + // 1-byte characters: 0xxxxxxx (ASCII) result.append(1, static_cast(codepoint)); } else if (codepoint <= 0x7ff) diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index 9226dc13..0829e9b1 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -410,7 +410,7 @@ class basic_json { Allocator alloc; m_value.object = alloc.allocate(1); - alloc.construct(m_value.object, value.begin(), value.end()); + alloc.construct(m_value.object, std::begin(value), std::end(value)); } /// create an array (explicit) @@ -438,7 +438,7 @@ class basic_json { Allocator alloc; m_value.array = alloc.allocate(1); - alloc.construct(m_value.array, value.begin(), value.end()); + alloc.construct(m_value.array, std::begin(value), std::end(value)); } /// create a string (explicit)