Код: Выделить всё
#include
int main()
{
static constexpr bool condition_a = true;
if constexpr (condition_a)
{
// I create object A
int A = 10;
}
if constexpr (condition_a)
{
// I try to use object A
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/78692663/multiple-use-constexpr-if[/url]