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
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.