Has anyone succeeded in specializing class templates with enable_if under
VC++7.1? I have created the simplest example possible and cannot imagine how
I could rewrite so that no Internal Compiler Error occurs.
I have tried with both the boost 1.31 and 1.32 headers, with no difference.
------------------------------------------------------
#include <iostream>
#include
#include
using namespace std;
using namespace boost;
template
struct A {
enum { X = 0 };
};
template<typename T>
struct A::type>
{
enum { X = 1 };
};
template<typename T>
struct A::type>
{
enum { X = 2 };
};
struct B {};
int _tmain(int argc, _TCHAR* argv[])
{
// cout << is_arithmetic<double>::value << endl;
typedef A<float> Afloat;
cout << Afloat::X << endl; // Internal Compiler Error
cout << A<int>::X << endl;
cout << A<B>::X << endl;
return 0;
}
------------------------------------------------------