json icon indicating copy to clipboard operation
json copied to clipboard

clang: error: no member named 'default_key'

Open matbech opened this issue 3 months ago • 0 comments

I'm getting the following compile error with clang 20.1.8 (clang-cl):

error: no member named 'default_key' in 'tao::json::traits<tao::json::basic_value<tao::json::traits>>'
   23 |          : key( Traits< std::decay_t< U > >::template default_key< Traits >::as_string() ),
message: in instantiation of function template specialization 'tao::json::internal::pair<tao::json::traits>::pair<tao::json::basic_value<tao::json::traits>>' requested here
   86 |         const auto jsonValue{ ParseJsonValue() };

pseudo code:

#include <tao/json/value.hpp>
#include <tao/json/to_string.hpp>
#include <tao/json/from_string.hpp>

[[nodiscard]] inline tao::json::value ParseJsonValue()
{
	std::string responseString;
	return tao::json::from_string(responseString);
}

I'm not able to reproduce this in an isolated case though.

matbech avatar Sep 24 '25 13:09 matbech