C++17 feature where the condition of the if statement gets evaluated at compile time. The result will influence which branch will be used. The other branch only needs a correct syntax.
Questions tagged [if-constexpr]
151 questions
-1
votes
1 answer
Determining specific type to use inside "if constexpr"
I am trying to get a feel for using "if constexpr( expr )" and perform actions if a particular type is detected.
I am tinkering with the following bit:
#include
#include
struct aT {};
struct bT {};
struct cT {};
constexpr…

rudycazabon
- 91
- 6