diff --git a/src/json.hpp b/src/json.hpp index 920dd4d68..81c02857f 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -2424,7 +2424,7 @@ class basic_json { using PointerType = typename std::add_pointer::type; // delegate the call to get_ptr<>() - auto ptr = obj.get_ptr(); + auto ptr = obj.template get_ptr(); if (ptr) return *ptr; throw std::domain_error("incompatible ReferenceType for get_ref, actual type is " + obj.type_name()); } diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index 13f749930..0838b234d 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -2424,7 +2424,7 @@ class basic_json { using PointerType = typename std::add_pointer::type; // delegate the call to get_ptr<>() - auto ptr = obj.get_ptr(); + auto ptr = obj.template get_ptr(); if (ptr) return *ptr; throw std::domain_error("incompatible ReferenceType for get_ref, actual type is " + obj.type_name()); }