Simplifying Compile-Time Options With if constexpr—Philippe Groarke

Save to:
Instapaper Pocket Readability

New possibilities open in front of us!

Simplifying Compile-Time Options With if constexpr

by Philippe Groarke

From the article:

My latest little experiment relates to compile-time options and eliminating preprocessor checks in user code. I’m not a big fan of MACROs, especially when they are simply used to make compile-time branches. I am also not a fan of other techniques used to minimize this problem. With C++17, we now have a beautiful and simple tool that can help remove all these preprocessor checks, if constexpr...

Add a Comment

You must sign in or register to add a comment.

Comments (0)

There are currently no comments on this entry.