6 Nov
2003
6 Nov
'03
1:47 p.m.
Joaquín Mª López Muñoz
The following programs does not compile with error
foo.cpp: In function `int main()': foo.cpp:11: no matching function for call to `foo(std::string)'
Program code:
#include
#include <string> template<typename Type> void foo(typename boost::call_traits<Type>::param_type x) { }
int main() { foo(std::string("bar"));
return 0; }
Environment is GCC 3.2 20020927 (prerelease) under Cygwin. Anyvody run into a similar problem? Workarounds, ideas? Thanx in advance.
This is standard behaviour. See my explanation in http://groups.google.com/groups?selm=slrnbisehj.1pc.do-not-spam-benh%40tin.b.... Without knowing what it is you are trying to do, I cannot offer a workaround.