Fraser Ross wrote:
> I cannot compile this:
> template <typename T1=char,
> template <typename, typename> class T2=std::basic_ifstream>
> struct X {
> T2<T1, std::char_traits<T1> > inputFileStream_;
> T2<T1, std::char_traits<T1> >& UseInputFileStream() {
> return inputFileStream_;
> };
> };
>
Compiles fine with g++ after adding #include<iostream>.
> I get an internal compiler error with the function. Have I missed the
> word
> typename anywhere? The compiler would probably accept code without
> typename
> anyway. Is this a compiler bug?
"Internal compiler error" usually says the compiler died on you. In my book,
that qualifies as a compiler bug.
Best
Kai-Uwe Bux
|