From 85a1140dd76abc289cc5184d68239eb0fd951de1 Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Sat, 27 Dec 2025 17:07:38 +0100 Subject: [PATCH] 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. --- src/config/configurationoptions.cpp | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) 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 ); } -- 1.7.1