c++/10111: Parse error for default template parameter

bangerth@dealii.org bangerth@dealii.org
Tue Mar 18 00:26:00 GMT 2003


Synopsis: Parse error for default template parameter

State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Tue Mar 18 00:08:31 2003
State-Changed-Why:
    Duplicate of PR 57. The code with parenthesis around the
    default arg now compiles in mainline.
    
    Previous versions of gcc gave a really unhelpful message
    on it, funnily:
    
    g/x> /home/bangerth/bin/gcc-3.3-pre/bin/c++ -c x.cc
    x.cc:13: error: parse error before `;' token
    
    Here is this part of the code:
    -----------------
    template <int I>
    struct B
    {
        template <class T, class U, class V>
        B (const A<T, U, V>&,
           typename A<T, U, V>::I = (typename A<T, U, V>::I ()), // #13
           typename A<T, U, V>::I = (A<T, U, V>::i)) { }
    };
    -----------------
    There's not ; on line 13, or anywhere close to it...
    
    W.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10111



More information about the Gcc-bugs mailing list