Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6192481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:57:02+00:00 2026-05-24T02:57:02+00:00

A point from iso C++ n3290 :Argument dependant Name Lookup: section 3.4.2, para 4

  • 0

A point from iso C++ n3290 :Argument dependant Name Lookup: section 3.4.2, para 4

When considering an associated namespace, the lookup is the same as the lookup
performed when the associated namespace is used as a qualifier (3.4.3.2) except
 that:
 — Any using-directives in the associated namespace are ignored.
 — Any namespace-scope friend functions or **friend function templates** declared
   in associated classes are visible within their respective namespaces even if 
   they are not visible during an ordinary lookup (11.3).
 — All names except those of(possibly overloaded) functions and function 
    templates are ignored.

Here when compare to earlier 2003 satndard he added the 3rd point .
can any one explain how it is possible …expalin with an example ….(overloaded)..

Andalso he said that in the second point he included the friend function templates(i know noraml calss friend functions) ..can any one explain this thats show’s that satatement .

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T02:57:03+00:00Added an answer on May 24, 2026 at 2:57 am

    I think the lookup should have always worked like that and is more of a clarification than actual change. I am not sure whether it was added because some other wording was added elsewhere that requires to make this clearer, compilers actually differed in some corner cases or some body questioned what is correct implementation.

    Ad point 2. Like you can declare that function f is friend of class c, you can also declare that function template t is friend of class c. The declaration is different, because it explicitly mentions the template arguments, so they felt the need to be explicit both cases apply.

    template <typename T> bool f(T);
    class c {
        friend bool f<c>(c); // only particular instantiation is friend
        template <typename T> friend bool f<T>(T); // all instantiations are friends
    }
    

    (of course, you can combine this with c being template itself for unlimited fun).

    Ad point 3. The clause means that if looking for function f in a namespace n that contains class f, the class f is not considered (while if you wrote n::f, it would take the class). The “possibly overloaded” does not really have to be there. Functions can always be overloaded and all overloads found across all namespaces will be included in the final overload resolution.

    namespace n {
        class c { ... };
        class e { ... } f;
    }
    
    namespace o {
        class d { ... };
        void f(c &, d &) { ... };
        void f(c &, d &, bool) { ... };
    }
    
    namespace p {
        f(c(), d());
    }
    

    Associated namespace of f(c(), d()) are both n and o. However n::f is not a function, but a (possibly functor) instance, so it’s not considered (while the old wording allowed considering f‘s operator()). o::f is overloaded, all overloads are considered (and, after gathering all possible meanings of f, the 3-argument variant is ruled out because only 2 arguments are given).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A point from ISO draft n3290 section 3.3.9 paragraph 4: The declarative region of
This is the statement from ISO C++ Standard 14.6.4.1 Point of instantiation 4.If a
This is the statement from ISO C++ Standard 14.6.4.1 Point of instantiation For a
This is the point from ISO :Standard Conversions:Array-to-pointer conversion: $4.2.1 An lvalue or rvalue
Statement from ISO standard $3.1 : 1st point n3242 Says: A declaration (Clause 7)
Can anyone explain this statement from ISO N3242 §3.2, 2nd point An expression is
Can anyone explain this statement from ISO N3242 §3.2, 2nd point A member of
Can anyone explain this statement from ISO N3242 §3.2, 2nd point A non-placement allocation
Does anyone know of a graphing library for simple transformation of a point from
Say you have a shipment. It needs to go from point A to point

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.