1 2 3 4 5 6 7 8 9 10 11
struct Example { private: struct iterator {}; public: iterator begin(); }; int main() { Example e; Example::iterator x = e.begin(); }
1 2 3
In function 'int main()': Line 3: error: 'struct Example::iterator' is private compilation terminated due to -Wfatal-errors.