#include <boost/utility/enable_if.hpp>
template <class T, bool alt = false>
struct Shablon
{
template <bool C>
typename boost::enable_if_c<C>::type doSomething() {
((T*)this)->m_member.foo();
((T*)this)->someFoo();
}
template <bool C>
typename boost::disable_if_c<C>::type doSomething() {
}
void foo()
{
doSomething<alt>();
((T*)this)->foo2();
}
};