Subject: Re: [boost] [static_if] Is there interest in a `static if` emulation library?
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2014-09-08 06:20:53
On 02/09/2014 00:06, Robert Ramey wrote:
> FWIW - I'm extremely skeptical of performance claims based on
> speculation. It wouldn't surprise me of compilers are already
> skipping compilation of dead branches for which it can be easily
> determined that there are no compile-time side-effects. In fact
> since I generally have very little problem with compile times these
> days - in spite of writing a lot of template code - I'll bet that
> compiler writers already do this. Not that it matters because
> it's just not a problem except in contrived pathological cases.
When you instantiate a template, it gets instantiated. It takes time. It
takes place in RAM that is never freed until the end of processing the TU.
There are costs associated to it.
I don't see why there is any need to be skeptical about the workings of
template mechanisms in C++ as implemented.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk