|
Boost : |
Subject: Re: [boost] "Simple C++11 metaprogramming"
From: Peter Dimov (lists_at_[hidden])
Date: 2015-07-16 07:12:42
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... . Another is find_if<L<T...>, P>, which is also much
faster when it expands P<T>... for every element, even though it technically
doesn't need to proceed beyond the first element for which P<T> is true.
> and on the well-formed programs it allows.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk