Skip to content

Resolve worrying GCC 12 warnings

This MR resolves use-after-free warnings generated by GCC 12.

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 them 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