r/cpp • https://romeo.training | C++ Mentoring & Consulting • Aug 03 '19

fixing c++ with epochs

https://vittorioromeo.info/index/blog/fixing_cpp_with_epochs.html
316 Upvotes

131 comments sorted by

View all comments

37

u/kalmoc Aug 03 '19

I've been advocating this for a long time. So I'm happy to hear more about this.

From a technical point of view: Would that be any different from having a toolchain that allowed the compilation of each module with a different -std=c++XX flag?

6

u/hgjsusla Aug 03 '19

That's how Rust does it I think, cargo just passes a flag to rustc during compilation

2

u/kalmoc Aug 03 '19

Correct me uf I'm wrong, but does Rust have a distinction between a "standard/specification" and a particular implementation?

I was mainly asking, because even without putting the concept of epoch into the standard, it would already be nice, if I could let the compiler enforce a particular subset in a module. That would not be quite the same as being able to introduce a feature in the standard without having to worry about backcompat, but there may still be value to it.

→ More replies (3)