------- Additional Comments From bangerth at dealii dot org  2005-02-01 14:27 
-------
This is in fact true. There is a mismatch between error messages for 
template function arguments and non-templates: 
-------------------- 
                    void foo1(); 
template <typename> void foo2(); 
 
template <typename> bool bar(void (*) () ); 
 
bool b1 = bar<int> (1, &foo1); 
bool b2 = bar<int> (1, &foo2<int>); 
-------------------- 
g/x> /home/bangerth/bin/gcc-4.0-pre/bin/c++ -c x.cc 
x.cc:6: error: no matching function for call to ?bar(int, void (*)())? 
x.cc:7: error: no matching function for call to ?bar(int, <unknown type>)? 
 
Since the complete template arguments to foo2 are given, the type should 
in fact be completely known. 
 
W. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |diagnostic
   Last reconfirmed|0000-00-00 00:00:00         |2005-02-01 14:27:13
               date|                            |
            Summary|less than optimal error     |suboptimal error message for
                   |message (actually, just     |template functions (as
                   |appears wrong, use of       |opposed to non-templates)
                   |<unknown_type>?)            |


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

Reply via email to