Should be more compatible with earlier Boost versions

release/4.3a0
dellaert 2014-12-01 22:29:27 +01:00
parent 78b1cd271a
commit 9bb336ac2b
1 changed files with 4 additions and 1 deletions

View File

@ -42,7 +42,10 @@ bool Function::initializeOrCheck(const string& name,
verbose_ = verbose;
return true;
} else {
if (name_ != name || !(templateArgValue_ == instName) || verbose_ != verbose)
if (name_ != name || verbose_ != verbose
|| ((bool) templateArgValue_ != (bool) instName)
|| ((bool) templateArgValue_ && (bool) instName
&& !(*templateArgValue_ == *instName)))
throw runtime_error(
"Function::initializeOrCheck called with different arguments");