
AMDG Robert Jones wrote:
I have this cut down code example <snip>
This compiles under gcc (3.4.4), but under Vis Studio 2008 gives a huge error message, (attached), but summarised as
boost\boost/tuple/detail/tuple_basic.hpp(439) : error C2664: 'boost::tuples::detail::non_storeable_type<T>::non_storeable_type(const boost::tuples::detail::non_storeable_type<T> &)' : cannot convert parameter 1 from 'bool (__cdecl &)(const A &)' to 'const boost::tuples::detail::non_storeable_type<T> &'
It also goes away if I introduce a temporary local variable for fnOfA.
Probably because you used a bool(*)(const A&) instead of bool(&)(const A&)? Pointer to functions are generally better behaved than references to functions.
Is this a know bug in VisStudio or Boost, possibly with a known solution?
Whatever the problem was, it appears to be fixed in the trunk. It errors through 1.37, I never downloaded 1.38 or 1.39, so I didn't check them. My best guess is that it was fixed by https://svn.boost.org/trac/boost/changeset/51448#file3 In Christ, Steven Watanabe