Skip to content

Resolve worrying GCC 12 warnings in Evaluator

GCC 12 warns about use-after-free issues with the private string implementation in Evaluator/src/string.src

CLHEP supports >=C++11, and compilers and their standard libraries have matured significantly since the code at issue was written originally >20y ago.

Consequently, the most efficient way to resolve these warnings is to excise completely the homespun implementations of hash_map, deque, and string, replacing their use with std::unordered_map, std::deque and std::string respectively.

These changes have been tested with GCC 4.8.5/C++11, GCC 12.1/C++17 and Clang 14.0.6/C++17/libc++

Merge request reports