Both template functions are required to return void.

$ cat u.cpp && g++ -c u.cpp
#include <algorithm>

template void std::fill_n (int*, int, const int&);
template void std::generate_n (int*, int, int (*)());

int main () { }
u.cpp:3: error: template-id 'fill_n<>' for 'void std::fill_n(int*, int, const
int&)' does not match any template declaration
u.cpp:4: error: template-id 'generate_n<>' for 'void std::generate_n(int*, int,
int (*)())' does not match any template declaration


-- 
           Summary: std::fill_n, std::generate_n incorrect signature
           Product: gcc
           Version: 4.0.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sebor at roguewave dot com
 GCC build triplet: all
  GCC host triplet: all
GCC target triplet: all


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

Reply via email to