boost::json question

"Keeling, William via Boost-users" <[email protected]> Tue, 11 Feb 2025 19:55:40 +0000
Newsgroups gmane.comp.lib.boost.user
Message-ID <IA1PR12MB75414D3A6C471083C5F25BB6FCFD2@IA1PR12MB7541.namprd12.prod.outlook.com>
json::value RCamCfg::GetCfgValue(const std::string& key)
{
                try {return config_.at_pointer(key);}
                catch(...) {
                                json::value x;
                                return x;}
}

bool RCamCfg::SetCfgValue(const std::string& key, const json::value& val)
{
                try {config_.set_at_pointer(key, val);}
                catch(...) {return false;}
                return {true};
}

The first function compiles and runs but the second fails to compile with the following:

error: 'class boost::json::value' has no member named 'set_at_pointer'; did you mean 'at_pointer'?

config_is defined as "json::value config_;"

Any ideas what I am doing wrong?

Thanks
William Keeling

_______________________________________________
Boost-users mailing list
[email protected]
https://lists.boost.org/mailman/listinfo.cgi/boost-users