Topic: Templates in namespaces prob
Author: bparker@gil.com.au (Brian Parker)
Date: 1997/03/06 Raw View
Hi all, I have hit a snag in using templates within namespaces.
I have code like this
namespace test{
template<class T>
class tt{
};
... other stuff I don't want available in global namespace.
}
using test::tt;
tt<int> a;
tt<double> b;
Microsoft VC4.2 doesn't accept the using test::tt but it is accepted
by Borland 5.01.
I couldn't find a clear answer in the Dec 96 draft standard as to
whether this is legal; certainly there are no examples of using
declarations with templates in the draft. Can anyone confirm what the
intent of the draft is here? Can one have using test::tt;? (I hope
so). What about using test<int>; etc?
Thanks,
Brian Parker (bparker@gil.com.au)
---
[ 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 ]
[ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
[ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu ]