Skip to content

Commit

Permalink
Use an explicit cast when need a bool from optional<...>. source/base…
Browse files Browse the repository at this point in the history
…/parameter_handler.cc

The implicit cast was previously allowed, but newer versions of BOOST together with C++11 mark
the cast as 'explicit', and it fails in the current context.
  • Loading branch information
bangerth committed Aug 21, 2014
1 parent 394cfc7 commit 57d975b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/base/parameter_handler.cc
Expand Up @@ -1275,7 +1275,7 @@ ParameterHandler::demangle (const std::string &s)
bool
ParameterHandler::is_parameter_node (const boost::property_tree::ptree &p)
{
return (p.get_optional<std::string>("value"));
return static_cast<bool>(p.get_optional<std::string>("value"));
}


Expand Down

0 comments on commit 57d975b

Please sign in to comment.