constexpr all the things! Since the evaluation of a constant expression never results in an erroneous behavior (EB, C++26)! (But use constexpr since C++11)
This was mentioned by many at the conference, not to forget: @DanielaKEngert, Mikhail Svetkin, and others.
@meetingcpp #cpp #cpp26 #cpp11 #meetingcpp #dev #undefined_behavior #ub #erroneous_behavior #eb
!["[..] Evaluation of a constant expression ([expr.const]) never exhibits behavior explicitly specified as undefined in [intro] through [cpp]. - end note"](https://files.mastodon.social/cache/media_attachments/files/115/518/544/403/871/578/small/2d36753c3ae6e7be.jpg)