Skip to content

Commit

Permalink
fixed failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fbischoff committed Aug 19, 2024
1 parent 917acf2 commit e69f63a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/madness/mra/QCCalculationParametersBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ class QCCalculationParametersBase {
std::transform(key_lower.begin(), key_lower.end(), key_lower.begin(), ::tolower);
std::transform(svalue.begin(), svalue.end(), svalue.begin(), ::tolower);
std::vector<std::string> av_lower_vec;
for (auto av : allowed_values) {
for (const T& av : allowed_values) {
std::string av_lower=tostring(av);
std::transform(av_lower.begin(), av_lower.end(), av_lower.begin(), ::tolower);
av_lower_vec.push_back(av_lower);
Expand Down Expand Up @@ -598,6 +598,7 @@ class QCCalculationParametersBase {
static std::string tostring(const T& arg) {
using madness::operators::operator<<;
std::ostringstream ss;
static_assert(not std::is_same<T,bool>::value, "you need to specialize tostring for this type");

ss<<std::scientific << std::setprecision(4) << arg;
std::string str=ss.str();
Expand Down
5 changes: 4 additions & 1 deletion src/madness/world/cloud.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ struct Recordlist {
} else if constexpr (std::is_pointer_v<T> && has_member_id<std::remove_pointer_t<T>>::value) {
return hash_value(arg->id());
} else {
return hash_value(arg);
// compute hash_code for fundamental types
std::size_t hashtype = typeid(T).hash_code();
hash_combine(hashtype,hash_value(arg));
return hashtype;
}
}

Expand Down

0 comments on commit e69f63a

Please sign in to comment.