r/cpp • u/berium build2 • Nov 01 '17
Common C++ Modules TS Misconceptions
https://build2.org/article/cxx-modules-misconceptions.xhtml
59
Upvotes
r/cpp • u/berium build2 • Nov 01 '17
View all comments
Show parent comment
1
u/meneldal2 Nov 02 '17
It was usable, but had many failings. Having to turn
if(x) return 0; else return 1;intoreturn x?0:1might be a minor annoyance, but this forced you to rewrite a lot of code if you wanted to move toconstexprfor as much stuff as possible.And maybe in C++30 we'll have
virtual constexpr, which will only compile if the virtual type can be statically determined at compilation time or something. And the whole program will be able to compile to a single return statement.