c++/508: ICE on ,unusual´ template use

tanis@gaspode.franken.de tanis@gaspode.franken.de
Tue Sep 5 14:26:00 GMT 2000

>Number:         508
>Category:       c++
>Synopsis:       ICE on ,unusual´ template use
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 05 14:26:01 PDT 2000
>Originator:     German Tischler
>Release:        unknown-1.0
gcc version 2.95.2 19991024 (release)
gcc ices during template instantiation of an operator
when two (or more) template parameters are present
and template parameter m is of type provided by
parameter n (n < m). Source code is


template <typename N,N e> struct A {};
template <typename N,N e> void operator<< (int, A<N,e> const & o) {}

int main()
        A<bool,0> a;
        operator<< <bool,0>(0,a); 

try to compile the above source
workaround: don´t use the above construction
(I cannot imagine where it would be hard to work around
Content-Type: application/octet-stream; name="dumb4.ii"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="dumb4.ii"


More information about the Gcc-bugs mailing list