On Mon, 14 Sept 2026 at 18:19, François Dumont <[email protected]> wrote:
>
> Hi
>
> On a previous patch Jonathan spotted that in _GLIBCXX_DEBUG
> implementation of inplace_vector we could use the builtin constant
> evaluated checks rather than the library equivalent.
>
> So here is this simplification outside any patch.
>
>      libstdc++: [_GLIBCXX_DEBUG] Simplify constant-evaluated checks
>
>      In the C++26 std::__debug::inplace_vector implementation we can use:
>
>      if consteval
>      {
>        ...
>      }

Everywhere else (well, almost everywhere) we put the opening brace on
the same line as 'if consteval'


>
>      rather than:
>
>      if (std::is_constant_evaluated())
>
>      libstdc++-v3/ChangeLog:
>
>              * include/debug/inplace_vector
>              (inplace_vector::emplace): Replace usages of
> std::is_constant_evaluated
>              by consteval.
>              (inplace_vector::insert): Likewise.
>              (inplace_vector::erase): Likewise.
>
> Tested under Linux x86_64 _GLIBCXX_DEBUG mode.
>
> 2 tests are already failing on master, I'm working on this independently
> of this patch.
>
> François
>

Reply via email to