On 6 December 2011 15:11, Piotr Wyderski wrote: > Hello, > > on gcc-4.6.2/x64/linux: > > template <typename... TA> inline string format(const string& fmt, > TA&&... args) { > > string_formatter f; > f.format(fmt, std::forward<TA>(args)...); > return f.get_result(); > } > > results in: > > error: no matching function for call to 'forward(const char* const&)' > note: candidates are: > /opt/a3d/stow/gcc-4.6.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/bits/move.h:62:5: > note: template<class _Tp> _Tp&& std::forward(typename > std::remove_reference<_Tp>::type&) > /opt/a3d/stow/gcc-4.6.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/bits/move.h:67:5: > note: template<class _Tp> _Tp&& std::forward(typename > std::remove_reference<_Tp>::type&&) > > Should I report it as a standard library bug?
I'm guessing you've called format<X> with an explicit template argument list, and it's not compatible with the actual types you called the function with. Due to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50828 the error doesn't show the explicit template arguments used.