Boost logo

Boost :

Subject: Re: [boost] "Simple C++11 metaprogramming"
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2015-07-16 16:29:24

On 16/07/15 12:12, Peter Dimov wrote:
> Mathias Gaunard wrote:
>> A core foundational library should not instantiate templates that it
>> doesn't strictly need to.
>> Instantiating templates has a very high impact on compile-time memory
>> usage, performance, ...
> That's not always true in C++11/17. One example is the and<T...>
> primitive, for which the short-circuit version is much slower than the
> one that always expands T::value...

That would depend on the cost of instantiating T, which you cannot
predict since it is a user-defined type.

Boost list run by bdawes at, gregod at, cpdaniel at, john at