Remix.run Logo
bluGill 4 hours ago

What is the point? C++ is mostly ABI compatible (std::string broke between C++98 and C++11 in GNU - but we can ignore something from 13 years ago). The is very little valid C++11 code that won't build as C++23 without changes (I can't think of anything, but if something exists it is probably something really bad where in C++11 you shouldn't have done that).

Now there is the possibility that someone could come up with a new breaking syntax and want a C++26 marker. However nobody really wants that. In part because C++98 code rebuilt as C++11 often saw a significant runtime improvement. Even today C code built as C++23 probably runs faster than when compiled as C (the exceptions are rare - generally either the code doesn't compile as C++, or it compiles but runs wrong)

Maxatar 2 hours ago | parent | next [-]

There are plenty of things between C++11 and C++23 that have been removed and hence won't compile:

Implicit capture of this in lambdas by copy.

std::iterator removed.

std::uncaught_exception() removed.

throw () exception specification removed.

std::strstream, std::istrstream, and std::ostrstream removed.

std::random_shuffle removed.

std::mem_fun and std::mem_fun_ref, std::bind1st and std::bind2nd removed.

There are numerous other things as well, but this is just off the top of my head.

bluGill 26 minutes ago | parent [-]

None of those things I've never used. Many of those are in bad practice for C++11.

wink 3 hours ago | parent | prev [-]

There is no inherent point, I was just wondering, if it's possible, why people don't use such a homegrown module layout like Rust editions in C++.

I only ever worked in a couple of codebases where we had one standard for everything that was compiled and I suppose that's what 90% of people do, or link static libs, or shared libs, so externalize at an earlier step.

So purely a thought experiment.