On 6/2/2011 7:02 AM, Joel Falcou wrote:
Seems somethign crooky on this front. Calling fusion::at_c on expression
ends up in error even after including boost/proto/fusion.hpp.
Same way, flatten used as a transform seems to not give me a type that
can be passed to any fusion or mpl function. Looking at
proto/fusion.hpp I noticed that the iterator is indeed random_access but
not the view itself which as a forward_traversal tag. Even
after fixing this, no dice, at_cN(some_proto_expr) still fails to
compile.
That's odd. Proto's fusion tests are passing on trunk and release, and
the following program compiles for me (on trunk):
#include boost/proto/proto.hpp
#include boost/fusion/include/at_c.hpp
namespace proto = boost::proto;
namespace fusion = boost::fusion;
int main()
{
proto::terminalint::type i = {42};
fusion::at_c1(i + i);
}
Can you post some code that demonstrates the problem?
Proto expressions are random access, but flattened views are
forward-only. That's a limitation of the current implementation of the
segmented Fusion stuff. It's a known problem. Segmented fusion needs a
complete rewrite, but it's a metaprogramming Everest, and I'm too tired
to climb it again. Some hot-shot metaprogramming wunderkind should try
cutting his/her teeth on that problem. They'd earn my eternal admiration
and appreciation.
--
Eric Niebler
BoostPro Computing
http://www.boostpro.com
___
proto mailing list
proto@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/proto