1
0
mirror of https://github.com/nlohmann/json synced 2024-11-26 22:00:07 +00:00

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
This commit is contained in:
dariomt 2015-10-16 11:11:16 +02:00
parent 57de1d602e
commit b342e1207c

View File

@ -2385,7 +2385,7 @@ class basic_json
template<typename PointerType, typename
std::enable_if<
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>
const PointerType get_ptr() const noexcept
{