(ISO C++, §8.3.6) The compiler does not bind default arguments in a member function at the end of the class declaration. Before the default argument appears, you must declare any value that you use in the default argument expression. An example using default arguments in member functions:
class foo {
enum A { AA };
int f(A a = AA); // OK
int f(B b = BB); // ERROR: BB is not declared yet
enum B { BB };
};