http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42356

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-10-22
                 CC|                            |manu at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #7 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2011-10-22 
12:27:11 UTC ---
Clang prints:

/tmp/webcompile/_26276_0.cc:17:19: error: no matching member function for call
to 'newNode'
    bar*    b = f.newNode<bar>();
                ~~^~~~~~~~~~~~
/tmp/webcompile/_26276_0.cc:6:13: note: candidate function template not viable:
requires 1 argument, but 0 were provided
    T*      newNode(U u) { return newNode()->init(u); }
            ^
/tmp/webcompile/_26276_0.cc:6:13: note: candidate function template not viable:
requires 1 argument, but 0 were provided
/tmp/webcompile/_26276_0.cc:8:13: note: candidate function template not viable:
requires 2 arguments, but 0 were provided
    T*      newNode(U u, V v) { return newNode()->init(u, v); }
            ^
/tmp/webcompile/_26276_0.cc:8:13: note: candidate function template not viable:
requires 2 arguments, but 0 were provided

which is nicer except for the duplicated messages.

The first thing that should go away is the "expected primary-expression" stuff.

Reply via email to