Add a ability to combination of if generator expression
In the current manual, if generator expression have prominent fascination in some scene.Nonetheless, there were some limitions on signature of if generator expression. Here is a description depicted from the reference in the following: _**
A fundamental category of generator expressions relates to conditional logic. Two forms of conditional generator expressions are supported:
$condition:true_string_ Evaluates to true_string if condition is 1, or an empty string if condition evaluates to 0. Any other value for condition results in an error._
$IF:condition,true_string,false_string_ New in version 3.8._
Evaluates to true_string if condition is 1, or false_string if condition is 0. Any other value for condition results in an error.
New in version 3.28: This generator expression short-circuits such that generator expressions in false_string will not evaluate when condition is 1, and generator expressions in true_string will not evaluate when condition is 0.
Typically, the condition is itself a generator expression. For instance, the following expression expands to DEBUG_MODE when the Debug configuration is used, and the empty string for all other configurations:
$<$CONFIG:Debug:DEBUG_MODE> Boolean-like condition values other than 1 or 0 can be handled by wrapping them with the $BOOL:..._ generator expression:_
There are three parameters depend on what we see above:
condition -> generator expression (Boolean-like) true_string -> string false_string-> string
It's simply that the second and third parameter must be the type of string.However, we hope,in some scene,that we have a ability to do a deep condition nested in current 'IF'. It means that we can make the second or third of parameter to be condition,which also generate the type of string in final. for example:
$<IF:$<COMPILE_LANG_AND_ID:CXX,GNU>,$<IF:$<CONFIG:Debug>,-O0,-O3>,$<IF:$<CONFIG:DEBUG>,/Od,/02>>
In the above exmaple, the second and third of parameter are IF generator expression that can be evaluated value is of type string.Hence,it could be the type of string or condition which can be evaluated the type of string for others type of parameter except first paramter. after this,the signature of IF generator expression can be depicted in the following: $IF:condition,true_string,false_string
condition :
`type of Boolean-able condition`
true_string:
| false_string
| string
| condition_s -> type of stringable conditiond
It seems like the utility of metaprogram '::std::conditional_t'.
Thanks for everyone who provide feedback to this issue