1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-19 17:03:16 +03:00

Fix and add test's for SFINAE problem

This commit is contained in:
Miguel Sacristan
2019-09-07 17:36:24 +02:00
parent 06ccd43a2a
commit e26a2904fc
3 changed files with 13 additions and 2 deletions

View File

@ -18445,7 +18445,7 @@ class basic_json
@since version 3.6.0
*/
template<typename KeyT, typename std::enable_if<
not std::is_same<KeyT, json_pointer>::value, int>::type = 0>
not std::is_same<typename std::decay<KeyT>::type, json_pointer>::value, int>::type = 0>
bool contains(KeyT && key) const
{
return is_object() and m_value.object->find(std::forward<KeyT>(key)) != m_value.object->end();