fixing compile issues on vc++14

release/4.3a0
Jing Dong 2017-05-16 14:15:01 -07:00
parent 8dfa38f943
commit 9f30d225fe
2 changed files with 14 additions and 12 deletions

View File

@ -116,7 +116,7 @@ if(MSVC)
endif()
endif()
find_package(Boost 1.43 COMPONENTS serialization system filesystem thread program_options date_time timer chrono)
find_package(Boost 1.43 COMPONENTS serialization system filesystem thread program_options date_time timer chrono regex)
# Required components
if(NOT Boost_SERIALIZATION_LIBRARY OR NOT Boost_SYSTEM_LIBRARY OR NOT Boost_FILESYSTEM_LIBRARY OR

View File

@ -87,7 +87,7 @@ bool DiscreteConditional::equals(const DiscreteFactor& other,
Potentials::ADT DiscreteConditional::choose(const Values& parentsValues) const {
ADT pFS(*this);
Key j; size_t value;
for(Key key: parents())
for(Key key: parents()) {
try {
j = (key);
value = parentsValues.at(j);
@ -98,6 +98,8 @@ Potentials::ADT DiscreteConditional::choose(const Values& parentsValues) const {
// pFS.print("pFS: ");
throw runtime_error("DiscreteConditional::choose: parent value missing");
};
}
return pFS;
}