summaryrefslogtreecommitdiff
path: root/boost/chrono/detail/scan_keyword.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/chrono/detail/scan_keyword.hpp')
-rw-r--r--boost/chrono/detail/scan_keyword.hpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/boost/chrono/detail/scan_keyword.hpp b/boost/chrono/detail/scan_keyword.hpp
index 13ad0ca8c8..7c3ba6e2af 100644
--- a/boost/chrono/detail/scan_keyword.hpp
+++ b/boost/chrono/detail/scan_keyword.hpp
@@ -23,10 +23,11 @@
#include <ios>
#include <exception>
#include <stdlib.h>
+#include <boost/throw_exception.hpp>
namespace boost {
using interprocess::unique_ptr;
-
+
namespace chrono {
namespace chrono_detail {
@@ -65,13 +66,13 @@ scan_keyword(InputIterator& b, InputIterator e,
unsigned char statbuf[100];
unsigned char* status = statbuf;
// Change free by free_aux to avoid
- // Error: Could not find a match for boost::interprocess::unique_ptr<unsigned char, void(*)(void*)>::unique_ptr(int, extern "C" void(void*))
+ // Error: Could not find a match for boost::interprocess::unique_ptr<unsigned char, void(*)(void*)>::unique_ptr(int, extern "C" void(void*))
unique_ptr<unsigned char, void(*)(void*)> stat_hold(0, free_aux);
if (nkw > sizeof(statbuf))
{
status = (unsigned char*)malloc(nkw);
if (status == 0)
- throw std::bad_alloc();
+ throw_exception(std::bad_alloc());
stat_hold.reset(status);
}
size_t n_might_match = nkw; // At this point, any keyword might match