selection-statement: if constexpr ( init-statement condition ) statement if constexpr ( init-statement condition ) statement else statement switch ( init-statement condition ) statement
template<typename T, typename ... Rest> void g(T&& p, Rest&& ...rs) {
  // ... handle p
  if constexpr (sizeof...(rs) > 0)
    g(rs...);       // never instantiated with an empty argument list
}
extern int x;       // no definition of x required
int f() {
  if constexpr (true)
    return 0;
  else if (x)
    return x;
  else
    return -x;
} — end exampleif constexpr ( init-statement condition ) statement
{ init-statement if constexpr ( condition ) statement }
if constexpr ( init-statement condition ) statement else statement
{ init-statement if constexpr ( condition ) statement else statement }
case constant-expression :
switch ( init-statement condition ) statement
{ init-statement switch ( condition ) statement }