Skip to content

Commit

Permalink
support -fno-exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
izvolov committed Aug 18, 2024
1 parent 9eb272b commit 671ac8f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libcxx/include/__algorithm/radix_sort.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ template <typename _Integer>
constexpr _Integer __intlog2(_Integer __integer) {
static_assert(is_integral<_Integer>::value, "Must be an integral type");

return __integer > 0 ? __intlog2_impl(__integer)
: throw domain_error("The binary logarithm is not defined on non-positive numbers");
return __integer > 0
? __intlog2_impl(__integer)
: (__throw_domain_error("The binary logarithm is not defined on non-positive numbers"), _Integer{0});
}

template <typename _InputIterator, typename _OutputIterator>
Expand Down

0 comments on commit 671ac8f

Please sign in to comment.