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

home
> prog
>> freecpp
>>> two phase lookup

translate to German (by SYSTRAN)

Two Phase Name Lookup

> two_phase_lookup.cpp:

int f()
{
  return 0;
}

int f(long l)
{
  return 0;
}

template<class T>
struct A
{
  int f()
  {
    return 1;
  }
};

template<class T>
struct B
  : A<T>
{
  int g()
  {
    return f();
  }
};


template<class T>
struct C
{
  int g()
  {
    return f(0);
  }
};

int f(int i)
{
  return 1;
}


int main()
{
  B<int> b;
  C<int> c;

  return b.g() + c.g();
}
---------------

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

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