We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 688730b commit 88719cfCopy full SHA for 88719cf
source/src_common/common/program_options/validator.hpp
@@ -62,7 +62,10 @@ namespace cath {
62
63
// Attempt to lexical_cast value_string and if it fails, throw an invalid_option_value exception
64
try {
65
- return U{ boost::lexical_cast<T>( value_string ) };
+ // Come all GCC versions > 4.9, just use `U{ }` rather than the `static_cast`
66
+ // which appears to confuse older GCCs to try aggregate initialization over copy
67
+ // construction in some cases
68
+ return static_cast<U>( boost::lexical_cast<T>( value_string ) );
69
}
70
catch (...) {
71
BOOST_THROW_EXCEPTION( boost::program_options::invalid_option_value( value_string ) );
0 commit comments