|
Boost : |
From: Ronald Garcia (garcia_at_[hidden])
Date: 2006-05-08 11:51:02
I based the program below on the Fusion docs, and it will not compile
under
powerpc-apple-darwin8-g++-4.0.0 (GCC) 4.0.0 20041026 (Apple Computer,
Inc. build 4061). The error I get is:
.../fusion/boost/fusion/sequence/view/filter_view/
filter_view_iterator.hpp:40: error: 'call' is not a member of
'boost::fusion::detail::static_find_if<boost::fusion::vector_iterator<co
nst boost::fusion::vector<int*, char, std::string,
boost::fusion::void_, boost::fusion::void_, boost::fusion::void_,
boost::fusion::void_, boost::fusion::void_, boost::fusion::void_,
boost::fusion::void_>, 0>, boost::fusion::vector_iterator<const
boost::fusion::vector<int*, char, std::string, boost::fusion::void_,
boost::fusion::void_, boost::fusion::void_, boost::fusion::void_,
boost::fusion::void_, boost::fusion::void_, boost::fusion::void_>,
3>, boost::is_pointer<boost::fusion::vector<int*, char, std::string,
boost::fusion::void_, boost::fusion::void_, boost::fusion::void_,
boost::fusion::void_, boost::fusion::void_, boost::fusion::void_,
boost::fusion::void_> > >'
Is there an obvious error in the program below?
Thanks,
ron
------------<snip>------------------
#include <boost/fusion/sequence.hpp>
#include <boost/fusion/algorithm.hpp>
#include <boost/type_traits/is_pointer.hpp>
struct nop {
template <typename T>
void operator()(T const& x) const { }
};
template <typename Sequence>
void pointer_nop(Sequence const& seq) {
using boost::fusion::filter_if;
for_each(filter_if<boost::is_pointer<Sequence> >(seq), nop
()); /// <<------ Instantiation of this line triggers the error
}
int main() {
using boost::fusion::vector;
using boost::fusion::at_c;
vector<int*,char,std::string> stuff(0,'x', "howdy");
pointer_nop(stuff);
}
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk