Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-08-28 06:59:19


Hi,
just now I've nearly comitted the following addition to one of BGL headers:

+ struct null_property_copier {
+ template<class V1, class V2>
+ void operator()(const V1&, const V2&) const {}
+ };
+

What stopped me is that is not BGL specific at all. Is there some class in
Boost which can be used insteead? Another BGL header has a class which two
empty operator() -- one taking single argument, and another taking two
argument. And that duplication is not good.

Would it be desirabe to have such class? I'm thinking about

struct do_nothing {
        template<class T>
        void operator()(const T&) const {}

        template<class T1, class T2>
       void operator()(const T1& t1, const T2& t2) const {}

       //....
}

And another question. Do we have a functional object which always returns
true, and can be called with two arguments of any types? Again, some BGL
header has such a class in detail namespace.

- Volodya


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