From: Thomas Jarosch Date: Sat, 27 Dec 2025 16:07:38 +0000 (+0100) Subject: Fix ambiguous shared_ptr reference X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=85a1140dd76abc289cc5184d68239eb0fd951de1;p=pingcheck Fix ambiguous shared_ptr reference Replace bare 'shared_ptr' with fully qualified 'boost::shared_ptr' to resolve ambiguity between std::shared_ptr and boost::shared_ptr in C++17. --- diff --git a/src/config/configurationoptions.cpp b/src/config/configurationoptions.cpp index 9e574dd..9a96c72 100644 --- a/src/config/configurationoptions.cpp +++ b/src/config/configurationoptions.cpp @@ -57,7 +57,6 @@ using boost::program_options::option_description; using boost::program_options::options_description; using boost::program_options::value; using boost::program_options::variables_map; -using boost::shared_ptr; using I2n::Logger::GlobalLogger; //----------------------------------------------------------------------------- @@ -173,7 +172,7 @@ options_description ConfigurationOptions::get_generic_options() const // deletes the boost::program_options::option_description, causing // multiple freed when ConfigurationOption try to delete it. option_description option = generic_option->get_option_description(); - shared_ptr< option_description > ptr( new option_description( option ) ); + boost::shared_ptr< option_description > ptr( new option_description( option ) ); options.add( ptr ); } @@ -190,14 +189,14 @@ options_description ConfigurationOptions::get_configuration_options() const BOOST_FOREACH( ConfigurationOptionItem configuration_option, ConfigOptions ) { option_description option = configuration_option->get_option_description(); - shared_ptr< option_description > ptr( new option_description( option ) ); + boost::shared_ptr< option_description > ptr( new option_description( option ) ); options.add( ptr ); } - BOOST_FOREACH( ConfigurationOptionItem host_option, HostOptions ) + BOOST_FOREACH( HostConfigurationOptionItem host_option, HostOptions ) { option_description option = host_option->get_option_description(); - shared_ptr< option_description > ptr( new option_description( option ) ); + boost::shared_ptr< option_description > ptr( new option_description( option ) ); options.add( ptr ); }