Given the following code:
class Named {
class /*Unnamed*/ {
void Function();
} un;
};
// Implement Named::Unnamed::Function here
int main() {
Named named;
named.un.Function();
}
Is there any way to implement Named::Unnamed::Function without either naming Unnamed or embedding the function's definition within the definition of Named?
I'm guessing the answer is "no", but GCC gives me the useful message "undefined reference to `Named::{unnamed type#2}::Function()', and it occured to me there might be some crazy possible syntax.