Topic: DR224 - interaction with depedent bases


Author: noway@sorry.com ("Giovanni Bajo")
Date: Thu, 25 Dec 2003 01:38:58 +0000 (UTC)
Raw View
Hello,

given the resolution of DR224, is the following code valid:

-------------------------
struct B
{
  typedef int K;
};

template <class T>
struct D : T
{
  typedef typename D::K K2;
};

// template struct D<B>;
-------------------------

Since D::K is not a dependent name anymore (it's a member of the current
instantiation), it should be looked up at definition time, not instantiation
time. What am I missing?
--
Giovanni Bajo

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]