Boost logo

Boost :

Subject: Re: [boost] [Castor] FYI : Castor 1.1 & Boost
From: Roshan (roshan_naik_at_[hidden])
Date: 2010-08-28 16:48:27


joel falcou wrote:
> This looks like a prime candidate for using Expression Templates. Does
> it already ?

Similar idea ... but a bit simpler due to combination of type erasure.

Here is the abridged idea :

typedef function<bool()> relation;

struct And {
    And(relation lhs, relation rhs);
    bool operator()(void);
};

relation && (relation lhs, relation rhs) {
    return And(lhs,rhs);
}

Same for operator || and operator ^
That allows you to freely combine the three operators.

The design of the core is described here:
http://www.mpprogramming.com/resources/castordesign.pdf

and also covered in this introductory video
http://www.mpprogramming.com/cpp/#Videos1.0

The current implementation has some minor differences from what is listed
in that doc... as 1.1 uses the new Coroutine facilites.

-roshan


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk