diff --git a/src/unit.cpp b/src/unit.cpp index 3d77dcb27920..1248894147d2 100644 --- a/src/unit.cpp +++ b/src/unit.cpp @@ -434,7 +434,13 @@ unit::unit(const config &cfg, bool use_traits, const vconfig* vcfg) : { cfg_.clear_children("advancement"); boost::copy( cfg.child_range("advancement") - , boost::make_function_output_iterator(boost::bind( &config::add_child, boost::ref(cfg_) /*thisptr*/, "advancement", _1 )) ); + , boost::make_function_output_iterator( + boost::bind( + /* The static_cast is required to select the proper overload in C++11 mode. */ + static_cast(&config::add_child) + , boost::ref(cfg_) /*thisptr*/ + , "advancement" + , _1 )) ); } //don't use the unit_type's abilities if this config has its own defined