Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-02-18 12:47:09

From: "dietmar_kuehl" <dietmar_kuehl_at_[hidden]>
> What does qualify as "most needed"? Clearly, some features would
> probably be useful and current C++ cannot do emulate them. 'typeof',
> when done correctly, probably falls into this category while typedef
> templates probably do not (they can be emulated similarily to the
> 'rebind' class).

No, when done correctly, they can't. X::typename rebind<...>::other (1) is a
nondeduced context, (2) cannot match a template template parameter.


template<class T> typedef smart_ptr<T, ...> shared_ptr;

template<class T> void f(shared_ptr<T>);


template<template<class> class V> void f();

f<std::vector>(); // error

template<class T> typedef std::vector<T> vector;

f<vector>(); // OK

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