Boost logo

Boost Users :

Subject: Re: [Boost-users] [proto] Can't use template domain class with BOOST_PROTO_BASIC_EXTENDS
From: joel falcou (joel.falcou_at_[hidden])
Date: 2010-10-09 15:22:14


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<class Expr,class Type,class Cardinal, class Dummy>
   struct expression
   {
     typedef domain<Type,Cardinal> domain_type;
     typedef expression<Expr,Type,Cardinal,Dummy> self_type;

     BOOST_PROTO_BASIC_EXTENDS(Expr, self_type, domain_type)
   };

   template<class Type,class Cardinal> struct generator
   {
     template<class Sig> struct result;
     template<class This, class Expr>
     struct result<This(Expr)> { typedef expression<Expr,Type,Cardinal>
type; };

     template<class Expr>
     expression<Expr,Type,Cardinal> const operator()(Expr const &xpr) const
     {
       expression<Expr,Type,Cardinal> const that = {xpr};
       return that;
     }
   };

   template<class Type,class Cardinal>
   struct domain : boost::proto::domain< generator<Type,Cardinal>
                                       , grammar<Type,Cardinal>
>
   {};

} }

> 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.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net