You don't need anything like this for C++
You don't need anything like this for C++
Posted Jun 19, 2012 21:08 UTC (Tue) by joib (subscriber, #8541)In reply to: You don't need anything like this for C++ by nix
Parent article: Calling for a new openSUSE development model
No need for 'using' tricks. I guess you're missing the point, which is that in C++11 there is a new feature called "inline namespaces" which allows one to designate a default namespace. So in the provided example, my_super_duper_library::foo generates a symbol reference to my_super_duper_library::version_1::foo (mangled, obviously). Code which was compiled against the old version of the library will keep on using my_super_duper_library::version_0::foo. Thus providing a way for the library developer to enhance the API while keeping ABI compatibility.
