Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-12-18 09:27:10


* Int2Type<v>

Used: MultiMethods.h

Suggestion:

Either accept as-is as a Loki implementation detail, or replace with
mpl::ct_value<int, v>, if possible.

* Type2Type<t>

Used: AbstractFactory.h

Suggestion: as above (mpl::ct_type<t>.)

* Select<bool, T, U>

Used: HierarchyGenerators.h, SmartPtr.h, TypeTraits.h, Typelist.h

Suggestion: replace with mpl::ct_ifv<bool, T, U>.

* NullType

Used: lots of places. ;-)

Remarks: the library assumes that this type is complete.

Suggestion: replace with mpl::nil.

* Typelist<T, U>

Used: lots of places.

Suggestion: replace with mpl::pair<T, U>.

* Length<L>

Used: never.

Suggestion: add as mpl::length<L>.

Remarks: the length/size debate is going to take days. ;-) If this provs to
be the case, not adding length<> at all is an option.

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

* TypeAtNonStrict<L, n, D = NullType>

Used: never.

Suggestion: skip.

* IndexOf<L, T>

Used: MultiMethods.h (strict, i.e. should never fail), TypeTraits.h (as
'contains' only, return value not used.)

Suggestion: add a strict variant as mpl::index_of<L, T>. add mpl::find<L, T>
for 'contains' queries.

* Append<L, T>

Used: by Reverse<L> (as push_back.)

Suggestion: add as mpl::append<L1, L2>. Remove the push_back functionality.

* Erase<L, T>

Used: Functor.h (to remove the first element), NoDuplicates<L>

Suggestion: either add as mpl::remove_first<L, T>, or skip.

* EraseAll<L, T>

Used: never.

Suggestion: add as mpl::remove<L, T>.

* NoDuplicates<L>

Used: never.

Suggestion: either add as mpl::unique<L> (implementation will use
mpl::remove), or skip.

* Replace<L, T, U>

Used: by DerivedToFront<L>.

Suggestion: add as mpl::replace_first<L, T, U>.

* ReplaceAll<L, T, U>

Used: never.

Suggestion: add as mpl::replace<L, T, U>.

* Reverse<L>

Used: AbstractFactory.h

Suggestion: add as mpl::reverse<L>.

Remarks: the current push_back-based implementation is O(N^2). O(N) is
possible: reduce(L, consq, nil).

* MostDerived, DerivedToFront:

Suggestion: keep these as an implementation detail of Loki, at least for
now.

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