途中で送っちゃった
これでおk

#include <iostream>

using namespace std;


template < int i > struct helper { } ;

template < int i > struct x {

int xxx( void ) { return dispatchXxx( helper< i >( ) ) ; }


private:

int dispatchXxx( helper< 0 > const & ) { return xxxZero( ) ; }

template < class T > int dispatchXxx( T const & ) { return xxxNonZero( ) ; }


int xxxZero( void ) { cout << "zero" << endl ; return 0 ;}

int xxxNonZero( void ) { cout << "non zero" << endl ; return 1 ;}

};


int main( void ) { x<0> x0; x<1> x1; x0.xxx(); x1.xxx(); return 0; }