3 ms·
The optimizer will delete bar() if FOO is a manifest constant that is not 3. Yes, but the compiler won't delete it and complain if bar is not defined. if cons
by shultays 5y ago
The optimizer will delete bar() if FOO is a manifest constant that is not 3.
Yes, but the compiler won't delete it and complain if bar is not defined. if constexpr is not a direct replacement for if macro
- WalterBright 5y ago> the compiler won't delete it and complain if bar is not defined extern void bar(); will define it to the satisfaction of the compiler. The linker won't complain if the compiler removes the call to it.
- shultays 5y agoAnd then you have the issue of not having types. consider this void my_bar_class_type::bar(my_bar_type<my_bar_type_2>::my_bar_inside_type paramater); and you are calling something like myObject->bar(mySecondObject.getWhatever()); You have to mock up like everything
- WalterBright 5y agoOr go up an abstraction layer so the type details are not needed.