Boost logo

Boost :

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


On 02/06/15 11:42, Peter Dimov wrote:

> The eagerness of template aliases is an obvious problem in at least one
> place and that place is mp_if, where the naive mp_if<P<T>, F<T>, G<T>>
> evaluates both F<T> and G<T>. But I'm not sure if there are others,
> under the assumption that we've no higher-order constructs. Eric
> Niebler's meta has an entire lazy:: namespace with deferred copies of
> all its constructs; continuing the general theme, I wonder whether all
> this is strictly needed once we jettison the lambda part.

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, and on the well-formed programs it allows.

A good library is one that is designed to be the least intrusive on the
applications that use it.
For a library, efficiency is more important than simplicity.


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