Boost logo

Boost :

From: Michael Fawcett (michael.fawcett_at_[hidden])
Date: 2007-03-08 14:49:23


On 3/8/07, Manuel Fiorelli <manuel.fiorelli_at_[hidden]> wrote:
> I agree with you, when you say that BOOST_NON_DERIVABLE macro is not useful
> with structures,
> since it introduces a great overhead.
> I was obliged to introduce that virtual functions, in order to fix a bug of
> the first version, but
> maybe I will find an alternative solution.

Please don't top post.

Maybe you could have both implementations available? That way a user
could decide to do

struct point : BOOST_NON_DERIVABLE { /* whatever */ };

or

class Foo : public Bar, BOOST_NON_DERIVABLE_MI { /* whatever */ };

Not the prettiest, and the first example is not immune to subsequent
design changes, but that could be mentioned in the docs...

The best solution would obviously be a single one that works correctly
in all situations. Good luck!

--Michael Fawcett


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