Commit 8f379ef3 by Niels

Merge pull request #137 from dariomt/patch-3

Detect correctly pointer-to-const
parents 746c1a71 8162a6e3
...@@ -2385,7 +2385,7 @@ class basic_json ...@@ -2385,7 +2385,7 @@ class basic_json
template<typename PointerType, typename template<typename PointerType, typename
std::enable_if< std::enable_if<
std::is_pointer<PointerType>::value std::is_pointer<PointerType>::value
and std::is_const<PointerType>::value and std::is_const< typename std::remove_pointer<PointerType>::type >::value
, int>::type = 0> , int>::type = 0>
const PointerType get_ptr() const noexcept const PointerType get_ptr() const noexcept
{ {
......
...@@ -2385,7 +2385,7 @@ class basic_json ...@@ -2385,7 +2385,7 @@ class basic_json
template<typename PointerType, typename template<typename PointerType, typename
std::enable_if< std::enable_if<
std::is_pointer<PointerType>::value std::is_pointer<PointerType>::value
and std::is_const<PointerType>::value and std::is_const< typename std::remove_pointer<PointerType>::type >::value
, int>::type = 0> , int>::type = 0>
const PointerType get_ptr() const noexcept const PointerType get_ptr() const noexcept
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment