From b342e1207c319b4c711ce4b35790838752627e1b Mon Sep 17 00:00:00 2001 From: dariomt Date: Fri, 16 Oct 2015 11:11:16 +0200 Subject: [PATCH 1/2] Detect correctly pointer-to-const The intention of the current code is to detect a pointer-to-const but instead it is detecting a const-pointer. See #134 --- src/json.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/json.hpp b/src/json.hpp index 7e174d720..aa85fad3e 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -2385,7 +2385,7 @@ class basic_json template::value - and std::is_const::value + and std::is_const< typename std::remove_pointer::type >::value , int>::type = 0> const PointerType get_ptr() const noexcept { From 8162a6e3a38407d57f37f84347301a510eb4db03 Mon Sep 17 00:00:00 2001 From: dariomt Date: Mon, 19 Oct 2015 12:26:38 +0200 Subject: [PATCH 2/2] Apply same change to the re2c file --- src/json.hpp.re2c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index 0ffddd503..8a1bea760 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -2385,7 +2385,7 @@ class basic_json template::value - and std::is_const::value + and std::is_const< typename std::remove_pointer::type >::value , int>::type = 0> const PointerType get_ptr() const noexcept {