Title
`std::simd::bit_ceil` should not be `noexcept`
Status
new
Section
[simd.bit]
Submitter
Matthias Kretz

Created on 2025-08-29.00:00:00 last changed 3 weeks ago

Messages

Date: 2025-09-19.18:06:38

Proposed resolution:

This wording is relative to N5014.

  1. Modify [simd.syn], header <simd> synopsis, as indicated:

    namespace std {
      […]
      // [simd.bit], bit manipulation
      template<simd-vec-type V> constexpr V byteswap(const V& v) noexcept;
      template<simd-vec-type V> constexpr V bit_ceil(const V& v) noexcept;
      template<simd-vec-type V> constexpr V bit_floor(const V& v) noexcept;  
      […]
    }
    
  2. Modify [simd.bit] as indicated:

    template<simd-vec-type V> constexpr V bit_ceil(const V& v) noexcept;
    

    -3- Constraints: The type `V::value_type` is an unsigned integer type ([basic.fundamental]).

    -4- Preconditions: […]

    […]

Date: 2025-08-29.00:00:00

`std::simd::bit_ceil` is declared 'noexcept' in [simd.syn] and [simd.bit]. But

  1. `std::bit_ceil` is not 'noexcept' ([bit.syn] and [bit.pow.two]) and

  2. `std::simd::bit_ceil` has a precondition.

History
Date User Action Args
2025-09-19 18:06:38adminsetmessages: + msg15066
2025-08-29 00:00:00admincreate