https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120554
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org, | |mpolacek at gcc dot gnu.org --- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- So, seems g++ rejects #c6 with -std=c++11, and accepts it for -std=c++1y and above since r6-7277-gb47d1d904d5397a61bba40fba095f02bd00f04c1. While clang++ accepts it only for -std=c++23. C++20 (looking at N4849) has in [class.copy.assign]/10 The implicitly-defined copy/move assignment operator is constexpr if ... X is a literal type, and ... but unsure where it is specified one can't mark it constexpr on explicit defaulted declaration. This later changed e.g. with https://wg21.link/p2448r2 and https://wg21.link/p2706r0 Anyway, on the libgcobol side, I'd just suggest dropping constexpr, if it is not literal type, constexpr for copy assignment makes no sense for it.