Bug#127489: Another g++ Internal Compiler Error with templates
reassign 127489 g++-2.95
retitle 127489 [fixed in g++-3.0] Another g++ Internal Compiler Error with templates
tags 127489 + fixed
thanks
rsteinke@w-link.net writes:
> Package: g++
> Version: 2:2.95.4-9
>
> I'm getting another internal compiler error involving templates,
>
> testcase.cpp: In function `int main()':
> testcase.cpp:25: Internal compiler error.
> testcase.cpp:25: Please submit a full bug report.
> testcase.cpp:25: Internal compiler error:
> testcase.cpp:25: See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
>
> The testcase code follows. Please check on a more recent version of g++ or
> forward upstream as appropriate.
>
> Thanks,
> Ron Steinke
>
> P.S. In the future, should I be forwarding these directly to the
> gcc people?
>
> ---
>
> template<const int dim> class C {};
>
> // This works
> template<const int dim, template<class> class container>
> C<dim> Foo(const container<C<dim> >& c)
> {
> return C<dim>();
> }
>
> // This doesn't
> template<const int dim, template<class> class container>
> C<dim> Bar(const container<C<dim> >& c,
> const container<double>& vals = container<double>())
> {
> return C<dim>();
> }
>
> #include<vector>
>
> int main()
> {
> vector<C<3> > vec;
>
> Foo(vec);
> Bar(vec);
>
> return 0;
> }
>
>
>
> --
> To UNSUBSCRIBE, email to debian-gcc-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
--
To UNSUBSCRIBE, email to debian-gcc-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: