
20 Nov
2012
20 Nov
'12
12:15 a.m.
No, in fact you can drop the bool, and and true; and just use enable_if. enable_if will even use the boolean operator to get to the underlying boolean ::value so you drop even more syntax:
template< typename T1 , typename T2 > void read_data_24( typename enable_if< is_same< T1, T2 > > ::type* /* ptr */ = 0) { int i = 9;
}
Thanks, that works, as well! Christian