What is the impact of namespaces in c++ linkages compared to linkages in c?
Is it possible to make a name that has internal linkage to external linkage just by using namespace.Similarly the other way around.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In general, namespace name is prepended to any enclosed entity’s name before the name is mangled and goes to the linker.
If you have two functions with the same signatures in different namespaces they link into one file just fine. If you have two classes with the same name and at least one method with the same signature and these classes are in different namespaces – they again link together just fine.