---------------
Christof Meerwald@freec++.prog

home
> prog
>> freecpp
>>> friend name injection

translate to German (by SYSTRAN)

Friend Name Injection

See 7.3.1.2 Namespace member definitions [namespace.memdef], paragraph 3, of the C++ standard.

Also see What is Koenig Lookup?

> friend_name_injection.cpp:

struct A
{
  friend int f(int i)
  {
    return 1;
  }
};

int f(long i)
{
  return 0;
}


int main()
{
  return f(0);
}
---------------

This Web page is licensed under the Creative Commons Attribution - NonCommercial - Share Alike License. Any use is subject to the Privacy Policy.

Revision: 1.4, cmeerw.org/prog/freecpp/friend_name_injection.html
Last modified: Mon Sep 03 18:20:50 2018
Christof Meerwald <cmeerw@cmeerw.org>
XMPP: cmeerw@cmeerw.org