
Le 16/02/2011 16:30, Christopher Jefferson a écrit :
It can't do, practically (random details follow)
The main purposes of inline namespaces is that the name of the inline namespace gets mangled into the object name, so
namespace std { inline namespace version1 { struct pair; } }
void my_function(std::pair);
The compiler creates a "mangled" string, which represents uniquely this function, including it's name and all the types it accepts. This is used by the linker to connect together calls to functions, and the function definitions.
Ok, I was being dense, and did only consider for instance the use of a pair* in a class definition, which is internal, not the use of pair in function declaration, where it is exported. So, if user cannot forward with inline namespaces, and implementers really need inline namespaces, I guess the only solution would be to require implementers special forwarding headers, but I'm afraid it's too late for that...