08/11/28 23:08:57
template <typename T>
class A {
public:
template <typename U> void f(U*,void (U::*)(T const*));
template <typename U,typename TT> void f(U*,void (U::*)(TT const*));
};
class X {
public:
//void f(int*); // <-コメントを外すとコンパイル成功
void f(int const*);
};
int main(int,char**)
{
A<int> a;
X x;
a.f(&x,&X::f); //<-error
}
Visual Studio 2008 SP1でなぜかコンパイル通らない。
これってC++の仕様?