Re:C++ 20: The Core Language
by jcranmer on Tuesday November 05, 2019 @01:05PM
(#21454895)
> (3) There's no widespread perception that C++14 or later bring compelling language improvements.
Constexpr if (introduced in C++17). If you're building a library that uses templated types (and therefore static dispatch instead of virtual functions and dynamic dispatch), then using constexpr if dramatically simplifies the implementation of your code.
Re:C++ 20: The Core Language
by saghm on Tuesday November 05, 2019 @01:16PM
(#21455021)
I don't think GP was arguing that there weren't any compelling language improvements, just that there isn't a "widespread perception" of those improvements.
Constexpr if (introduced in C++17). If you're building a library that uses templated types (and therefore static dispatch instead of virtual functions and dynamic dispatch), then using constexpr if dramatically simplifies the implementation of your code.