I am beginner to C++, so my question is probably very naive. For instance, during runtime I decide to initialize a variable using std::optional, i.e. the variable is only defined under certain conditions. My idea is now: Ignore all the following code where the variable will be part of it.
Line 34: std::optional<unsigned int> may_defined_or_not = ...;
...
//Line 45 should be ignored when compiling the code
Line 45: may_defined_or_not += 2;
//Even more complicated: Ignore this whole if-block
Line 57: if(may_defined_or_not) {...}
Is something like that possible at all? If so, I would appreciated getting some keywords to look for! Tnak you very much!