Relative Content

Tag Archive for c++language-lawyerc++20constexprc++23

Explicitly constexpr default comparisons

After a regression in GCC 13.3, I had to add constexpr to defaulted spaceship operators in my program, and observed some discrepancies in how compilers treat some code in C++20 mode. These can be shown on equality comparison operator for the sake of code brevity below.