Date
2020-11-15.00:00:00
Message id
4633

Content

[Accepted at the November, 2020 meeting as part of paper P1787R6 and moved to DR at the February, 2021 meeting.]

N3690 comment CA 21

Consider the following example:

  template <typename T> struct B { };
  namespace N {
    namespace L {
      template <int> void A();
    }
    namespace M {
      template <int> struct A { typedef int y; };
    }
    using namespace L;
    using namespace M;
  }
  B<N::/*template */A<0>::y> (x);

Which A is referenced in the last line? According to 6.5.5 [basic.lookup.qual] paragraph 1,

If a :: scope resolution operator in a nested-name-specifier is not preceded by a decltype-specifier, lookup of the name preceding that :: considers only namespaces, types, and templates whose specializations are types.

It is not clear whether this applies to the example or not, and the interpretation of the < token depends on the result of the lookup.