diff --git a/include/boost/unordered/unordered_flat_map.hpp b/include/boost/unordered/unordered_flat_map.hpp index 6a58269a..f9309ac7 100644 --- a/include/boost/unordered/unordered_flat_map.hpp +++ b/include/boost/unordered/unordered_flat_map.hpp @@ -16,6 +16,7 @@ #include #include +#include #include #include @@ -313,7 +314,8 @@ namespace boost { // TODO: someday refactor this to conditionally serialize the key and // include it in the error message // - throw std::out_of_range("key was not found in unordered_flat_map"); + boost::throw_exception( + std::out_of_range("key was not found in unordered_flat_map")); } mapped_type const& at(key_type const& key) const @@ -322,7 +324,8 @@ namespace boost { if (pos != table_.end()) { return pos->second; } - throw std::out_of_range("key was not found in unordered_flat_map"); + boost::throw_exception( + std::out_of_range("key was not found in unordered_flat_map")); } mapped_type& operator[](key_type const& key)