Boost logo

Boost :

From: Jaakko Jarvi (jajarvi_at_[hidden])
Date: 2003-07-16 03:10:39


In our last exciting episode Markus Werle wrote:
> Lines: 24
> Mail-Copies-To: numerical.simulation_at_[hidden]
> User-Agent: KNode/0.6.1

> Jaakko Jarvi wrote code that looks like this:

> template <bool B, class T = void>
> struct disable_if: public enable_if< !B, T> {};

> I have a question regarding compile time:
> Do you have experience about whether this elegant solution
> might have some compile time penalty due to inheritance?
> Or is this faster than doubling the code?

We have made no measurements. The use of inheritance is motivated by getting
a miniscule bit of reuse.
If another formulation leads to better compile-time or runtime
performance, it's worth while to change.

  Cheers, Jaakko


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