#erroneous_behavior

netrom has movednetrom@infosec.exchange
2025-11-09

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"

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst