P3440

Add mask_from_count function to std::simd

R4

Proposal to add `std::simd::mask_from_count` function to create a mask containing an exact number of set bits. Such a function is notably useful for handling loop remainders.

Authors
Daniel Towner
Mailing
2026-10
Doc date
2026-10-14
Audience
LWG

Revision history

  1. 2026-10
    R4 Selected (shown above)
  2. 2026-04

    Add mask_from_count function to std::simd

    P
  3. 2026-02
    R2 LEWG

    Add mask_from_count function to std::simd

  4. 2025-07
    R1 LEWG

    Add n_elements named constructor to std::simd