When declaring and implementing a class or struct in c++ we generally do:
H file
namespace Space{
class Something{
void method();
}
}
CPP file
void Space::Something::method(){
//do stuff
}
OR
namespace Space{
void Something::method(){
//do stuff
}
}
Note how it is possible to wrap all the implementations inside the namespace block so we don't need to write Space:: before each member. Is there a way to wrap class members in some similar way?
Please note I want to keep source and header file separated. That's generally a good practice.