A point from the ISO C++ Draft n3290 : 3.4.0 2nd point
A name “looked up in the context of an expression” is looked up as an unqualified name in the scope where the expression is found.
Would someone please explain this statement with an example?
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.
It says that the scope which contains the expression will be searched for the name. i.e.
if you have this code the name
do_somethingwill be searched in the scope offoobar,bar,fooand in the global scope (and not in other namespaces, structs or function scopes)