From 91f5925c41fd6f1c7d2ee0cc1ea67409e8edd1d1 Mon Sep 17 00:00:00 2001 From: Christian Mazakas Date: Mon, 10 Oct 2022 15:43:38 -0700 Subject: [PATCH] Replace naked throw statements with boost::throw_exception() --- include/boost/unordered/unordered_flat_map.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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)