Good time of day.
Develop in C++ for a long time, the special problems do not feel, but now faced with the task that don't understand how to solve, although it can be solved easily. Please tell me is there any way to completely disable the generation of a specific piece of code in a template function (as it would when using the preprocessor). Example:
template <classt, bool alt="false">
((T*)this)->m_member.foo(); // compile error if alt == false and the class T has no member method foo.