Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-12-14 09:38:41


From: "David Abrahams" <david.abrahams_at_[hidden]>
> Interesting idea; it might improve lambda expressions, particularly
> meta-lambdas. I don't understand your paraphrase of Andrei's proposal:
>
> "Andrei proposed that template template parameters be defined as
>
> template<template T> void f()
> {
> T<int> t;
> }
>
> making them more flexible."
>
> Is he just saying that TTPs should be allowed on function templates, or
> something else?

He proposed that a TTP be identified only by "template T", omitting the full
signature (template<class> class T, say.)

The current 'compile-time type system' is too strict in the sense that

template<class> class Container

doesn't match std::vector because of the additional allocator template
parameter of std::vector.

The logical next step is to drop the template parameter "type" at all. :-)

Another logical step is to allow anything to be a template:

template<class T> static const bool is_const = false;
template<class U> static const bool is_const<U const> = true;

;-)

--
Peter Dimov
Multi Media Ltd.

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