Boost logo

Boost :

From: Fernando Cacciola (fcacciola_at_[hidden])
Date: 2001-12-18 09:43:57


----- Original Message -----
From: Peter Dimov <pdimov_at_[hidden]>
To: Boost List <boost_at_[hidden]>
Sent: Tuesday, December 18, 2001 11:27 AM
Subject: [boost] Loki typelist.h/typemanip.h analysis

> [SNIPPED]
>
> * Select<bool, T, U>
>
> Used: HierarchyGenerators.h, SmartPtr.h, TypeTraits.h, Typelist.h
>
> Suggestion: replace with mpl::ct_ifv<bool, T, U>.
>
>
> * TypeAt<L, n>
>
> Used: Functor.h (TypeAt<L, 0> - emulates a (car L) operation.);
> HierarchyGenerators.h
>
> Suggestion: add as mpl::atv<L, n>; add mpl::at<L, N> with effects
> mpl::atv<L, N::value>.
>

Just a couple of things regarding non-type template parameters and Borland
C++ 5.5.1

As it does a very poor job handling that, I suggest:

Provide: ct_if<BoolAsType,F,T> and use THIS as much as possible.

Similarly: make mpl::at<L,N> the basic primitive used thoroughly.

Provide mpl::atv<> and ct_ifv<> but deprecate them and try to avoid them as
much as possible.

The same rationale goes for every 'non-type' metafunction.

Fernando Cacciola
Sierra s.r.l.
fcacciola_at_[hidden]
www.gosierra.com


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