[Bind] Unresolved overloaded function type
Hi All
Can anyone tell me how to fix this? It's fine with one Fedora/Boost version
combination, but not with another!
#include <algorithm>
#include
g++ -c a.cpp a.cpp: In function 'int main()': a.cpp:8: error: no matching function for call to 'bind(<unresolved overloaded function type>, boost::arg<1>&, boost::arg<2>&)'
Thx - Rob.
On Fri, Aug 19, 2011 at 10:37 AM, Robert Jones
Hi All Can anyone tell me how to fix this? It's fine with one Fedora/Boost version combination, but not with another!
Which one would that be?
Possibilities:
1) Use boost::bind and cast max to the right function type (ugly):
bind(static_cast
On Sun, Aug 21, 2011 at 8:31 AM, Thomas Heller
On Fri, Aug 19, 2011 at 10:37 AM, Robert Jones
wrote: Hi All Can anyone tell me how to fix this? It's fine with one Fedora/Boost version combination, but not with another!
Which one would that be?
Possibilities: 1) Use boost::bind and cast max to the right function type (ugly): bind(static_cast
(&std::max), ....) OR
2) Use boost::phoenix (if you have 1.47 or above):
2.1) Adapt the max function:
http://www.boost.org/doc/libs/1_47_0/libs/phoenix/doc/html/phoenix/modules/f...
OR
2.2) Use some shortcut syntax: boost::phoenix::bind
(&std::max, ...)
Hi Thomas
I'm acutely aware how easily and painlessly Phoenix would solve my problems,
but sadly it
won't be an option for me for quite a while in production code.
In the meantime your suggestion 1 nearly works - I found I needed to write
bind(static_cast
participants (2)
-
Robert Jones
-
Thomas Heller