$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [proto] problem with templated recursive transform
From: Eric Niebler (eric_at_[hidden])
Date: 2009-02-06 18:18:05
Daniel Oberhoff wrote:
> Sorry, I had hoped there was something obviously broken. Like templating 
> a transform based on proto::or_/proto::when.  I placed a zip-file here 
> with the files here:
> 
> http://danieloberhoff.de/files/for_eric
> 
> There are four headers and a test-suite, based on cppunit. The 
> expression that breaks is on line 59. Makefile is also there. If that is 
> too messy for you I can try to trim it down to just this problem.  The 
> class that breaks is at the end of CPUDataNDExpressionIterators.hpp.
I removed the dependency on cppunit (not hard), adding a missing 
#include <vector>, removed spurious semicolons after 
BOOST_PROTO_EXTENDS() and BOOST_PROTO_BASIC_EXTENDS(), and after that, 
the only problem I saw was this on line 62 of CPUDataNDExpressions.hpp:
proto::function< proto::terminal< CPUDataND_< T > >, index_grammar, 
index_grammar, index_grammar, index_grammar, index_grammar >
This requires BOOST_PROTO_MAX_ARITY to be set to 6, whereas by default 
it is set to 5. After deleting this line, everything compiles and runs 
just fine for me. I'm using gcc-4.3. Much work would be necessary to 
make this work with msvc, which has a much harder time with the nested 
function types used in callable and object transforms.
HTH,
-- Eric Niebler BoostPro Computing http://www.boostpro.com