diff options
Diffstat (limited to 'libcxx/src/hash.cpp')
-rw-r--r-- | libcxx/src/hash.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/libcxx/src/hash.cpp b/libcxx/src/hash.cpp index 1631b91acb1..89bb736c86c 100644 --- a/libcxx/src/hash.cpp +++ b/libcxx/src/hash.cpp @@ -153,12 +153,8 @@ inline _LIBCPP_INLINE_VISIBILITY typename enable_if<_Sz == 4, void>::type __check_for_overflow(size_t N) { -#ifndef _LIBCPP_NO_EXCEPTIONS if (N > 0xFFFFFFFB) - throw overflow_error("__next_prime overflow"); -#else - (void)N; -#endif + __throw_overflow_error("__next_prime overflow"); } template <size_t _Sz = sizeof(size_t)> @@ -166,12 +162,8 @@ inline _LIBCPP_INLINE_VISIBILITY typename enable_if<_Sz == 8, void>::type __check_for_overflow(size_t N) { -#ifndef _LIBCPP_NO_EXCEPTIONS if (N > 0xFFFFFFFFFFFFFFC5ull) - throw overflow_error("__next_prime overflow"); -#else - (void)N; -#endif + __throw_overflow_error("__next_prime overflow"); } size_t |