libstdc++ header ordering problem
Nathan Sidwell
nathan@codesourcery.com
Thu Jan 23 19:36:00 GMT 2003
Hi,
this fixes a problem I discovered in implementing more of the two-stage
name lookup. The valarray headers had code equivalent to
template <typename T> struct TPL;
template <typename T> struct X {
const TPL<int>& thing;
int Foo () {
return thing.fn ();
}
};
At the indicated line, thing's type is not dependent, so the .fn bit is
looked up at parse, not instantiation, time. Thus TPL<int> must be
instantiated already.
The patch splits valarray_meta into before and after portions, to avoid
the problem.
built & tested on i686-pc-linux-gnu. ok?
Once this is in, I can install my patch for spr 795.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
The voices in my head said this was stupid too
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: valarray.patch
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20030123/f0ac9d4a/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: valarray_before.h
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20030123/f0ac9d4a/attachment.h>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: valarray_array.h
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20030123/f0ac9d4a/attachment-0001.h>
More information about the Libstdc++
mailing list