Title
`member_offset::total_bits` should be `noexcept`
Status
new
Section
[meta.reflection.layout]
Submitter
Hewill Kang

Created on 2026-03-10.00:00:00 last changed 2 weeks ago

Messages

Date: 2026-03-13.10:36:10

Proposed resolution:

This wording is relative to N5032.

  1. Modify [meta.reflection.layout] as indicated:

    struct member_offset {
      ptrdiff_t bytes;
      ptrdiff_t bits;
      constexpr ptrdiff_t total_bits() const noexcept;
      auto operator<=>(const member_offset&) const = default;
    };
    
    constexpr ptrdiff_t member_offset::total_bits() const noexcept;
    

    -1- Returns: `bytes * CHAR_BIT + bits`.

Date: 2026-03-10.00:00:00

This member simply returns the result of integer calculations, which can be `noexcept`.

History
Date User Action Args
2026-03-13 10:36:10adminsetmessages: + msg16019
2026-03-10 00:00:00admincreate