Let\'s take the following example program:
#include
namespace half_float
{
template struct half_expr {};
struct hal
A workaround is to specialise _Common_float_type for half and half_expr to be an undefined type, so that SFINAE gets rid of the VS2012 version of atan2.
namespace std {
template
struct _Common_float_type, half_float::half_expr>;
template
struct _Common_float_type>;
template
struct _Common_float_type, half_float::half>;
template<>
struct _Common_float_type;
}
Note that you have to specialise for all four combinations of half and half_expr, because template specialisation doesn't consider base classes.