|
Boost : |
From: shunsuke (pstade.mb_at_[hidden])
Date: 2007-09-17 07:36:28
Hi,
Some algorithms doesn't work with empty boost::tuple.
See...
#include <boost/fusion/algorithm/query/find.hpp>
#include <boost/tuple/tuple.hpp>
#include <boost/fusion/sequence/container/vector.hpp>
#include <boost/fusion/sequence/adapted/boost_tuple.hpp>
#include <boost/fusion/algorithm/query/count.hpp>
int main()
{
{
boost::fusion::vector<> v;
boost::fusion::begin(v);
boost::fusion::find<int>(v);
boost::fusion::count(v, 1);
}
{
boost::tuples::tuple<> t;
boost::fusion::begin(t);
//boost::fusion::count(t, 1); // doesn't compile.
//boost::fusion::find<int>(t);// doesn't compile.
}
}
(tested on msvc-8.0 and gcc3.4)
I don't know why; errors are very complicated :-(
Regards,
-- Shunsuke Sogame
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk