C++ Logo

std-proposals

Advanced search

[std-proposals] if () {typedef x y;}

From: Abdullah Qasim <iamminecraftredstoner_at_[hidden]>
Date: Sun, 1 May 2022 08:30:24 +0000
if (cond) {
    typedef int type;
} else {
    typedef double type;
}
type x;


This is useful in many ways, as one can check for cond ni one place, rather than use global variables, & check 27 times...

Received on 2022-05-01 08:30:27