-1
struct Real
{
virtual void method() const{}
};
typedef int (*function_t)(int);
typedef void (Real::*method_t)() const;
function_t f1()
{
cout << __PRETTY_FUNCTION__ << endl;
return NULL;
}
method_t f2()
{
cout << __PRETTY_FUNCTION__ << endl;
return NULL;
}
는 출력을 생성
int (* f1())(int)
void (Real::* f2())()const
GCC 4.6.3 (우분투/리나 4.6.3-1ubuntu5)로 컴파일있다. 이것은 나를 위해 너무 불분명합니다, 나는 그것이 같아야한다고 생각합니다 :
int (*)(int) f1()
void (Real::*)()const f2()
왜? 어쩌면 그것은 컴파일러 버그일까요?
"특정"이어야하는 것은 아닙니다. 구현 정의입니다. – rightfold