2010/12/14 Igor R <boost.lists@gmail.com>
> I thing sfinae should disable the above test() functions for every Type,
> that doesn't have a nested type my_type.

So is it possible not to evaluate Type::my_type, if Type is int? I
tried to use lazy_enable_if, but with no success...


How about adding this overload:

void test( int )
{
}

Or if You want to disable implicit conversions to int, add this overload instead:
template<typename Type>
void test(Type, typename boost::enable_if< boost::is_same<Type, int> >::type* dummy = 0)
{
}

warning: untested

Regards,
Kris