[proto] Can't use template domain class with BOOST_PROTO_BASIC_EXTENDS
Trying to use template domain class with BOOST_PROTO_BASIC_EXTENDS ends up in an error leading to the fact this ligne in the macro is incorrect when the Domain is template: BOOST_PROTO_BASIC_EXTENDS_(Expr, Derived, Domain) typedef void proto_is_aggregate_; typedef Domain::proto_generator proto_generator; Obviously this is alckign a typename before Domain::proto_generator if Domain is actually a template class. Thing is used to work before ( aorund 1.40) so I guess somethign changed around here. I guess a details meta-function extracting the domain will fix that or am I wrong ? namespace boost { namespace proto { template<class Domain> generator_of { typedef typename Domain::proto_generator type; }; } } BOOST_PROTO_BASIC_EXTENDS_(Expr, Derived, Domain) typedef void proto_is_aggregate_; typedef typename generator_of<Domain>::type proto_generator; Or is it ?
On 10/9/2010 12:02 PM, joel falcou wrote:
Trying to use template domain class with BOOST_PROTO_BASIC_EXTENDS ends up in an error leading to the fact this ligne in the macro is incorrect when the Domain is template:
BOOST_PROTO_BASIC_EXTENDS_(Expr, Derived, Domain) typedef void proto_is_aggregate_; typedef Domain::proto_generator proto_generator;
Obviously this is alckign a typename before Domain::proto_generator if Domain is actually a template class.
You mean, if Domain is a template parameter. Crap.
Thing is used to work before ( aorund 1.40) so I guess somethign changed around here. I guess a details meta-function extracting the domain will fix that or am I wrong ?
namespace boost { namespace proto { template<class Domain> generator_of { typedef typename Domain::proto_generator type; }; } }
BOOST_PROTO_BASIC_EXTENDS_(Expr, Derived, Domain) typedef void proto_is_aggregate_; typedef typename generator_of<Domain>::type proto_generator;
Or is it ?
That doesn't help. The "typename" would be incorrect (in C++03) if Domain is not a template parameter. Sometimes I really love C++. This is not one of those times. I think I need to add (and test and document) a whole other collection of macros to support this corner case. Grrrr... Please file a bug. Thanks, -- Eric Niebler BoostPro Computing http://www.boostpro.com
On 09/10/10 21:15, Eric Niebler wrote:
You mean, if Domain is a template parameter. Crap.
Yes sorry
Use case at hand is :
namespace nt2 { namespace simd
{
template
{}; } }
I think I need to add (and test and document) a whole other collection of macros to support this corner case. Grrrr...
Wait, as I said, it worked pre 1.43. So mayeb we can track the change in the svn log ? Filling the bug atm so we don't lose it.
On 10/9/2010 12:22 PM, joel falcou wrote:
On 09/10/10 21:15, Eric Niebler wrote:
I think I need to add (and test and document) a whole other collection of macros to support this corner case. Grrrr...
Wait, as I said, it worked pre 1.43. So mayeb we can track the change in the svn log ?
That's assuming the change was accidental. It wasn't. -- Eric Niebler BoostPro Computing http://www.boostpro.com
participants (2)
-
Eric Niebler
-
joel falcou