|
Boost : |
Subject: Re: [boost] [proto][can_be_called]
From: Jesse Perla (jesseperla_at_[hidden])
Date: 2010-05-06 17:43:28
Larry Evans <cppljevans <at> suddenlink.net> writes:
> I just did svn update for trunk, and then grep'ed for can_be_called;
> however, nothing turned up. Also:
>
>
http://www.boost.org/doc/libs/1_42_0/doc/html/proto/reference.html#proto.referen
ce.classes
I believe that the docs are just using it as an example rather than adding it
to the library.
See the following thread where Rutger gives a good implementation using this
approach (certainly better than my version).
http://old.nabble.com/-traits-function_types-generic--Can-F-be-called-with-
%7Ba0,-...,-aN%7D--td27760559.html
Also see the comments on the limitations: This approach and code does not seem
to work with function objects from:
boost::lambda, boost::lambda::bind, boost::phoenix, and my implementation of
std::lambda under MSVC.
If anyone can figure out a consistent way for 'can_be_called' work for all of
these different objects, it would be a great addition.
And for Phoenix3, maybe support could be added for this type of operation? I
had previously asked about this http://groups.google.com/group/boost-
list/browse_thread/thread/8e54612df8c92671/b4b9dcaa91f61094?lnk=raot
but ultimately failed to figure it out.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk