Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2007-07-08 08:54:24

On 07/07/2007 11:49 AM, Eric Niebler wrote:
> template<typename Expr>
> struct wrap
> {
> explicit wrap(Expr const &expr)
> {}
> };
Thanks very much Eric; however, I found that with the following:

      template<typename Expr>
      struct wrap
      #define INHERIT_EXPR
      #ifdef INHERIT_EXPR
      : Expr
          explicit wrap(Expr const &expr)

the wrap CTOR is not called when:

          WrapItUp::call( _1 + _2, i, i );

is executed. OTOH, if INHERIT_EXPR is undefined,
then wrap CTOR *is* called. There must be some typedef needed
by wrap in order for WrapItUp::call to actually call
the wrap CTOR. I'll start looking for it, but I'd
appreciate any clues.



Boost list run by bdawes at, gregod at, cpdaniel at, john at