Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-04-11 23:25:11

----- Original Message -----
From: "joel de guzman" <djowel_at_[hidden]>
> Simply that I cannot write the simplest MPL algorithm, predicate or
> function without using MPL facilities. Consider this:
> template <class IteratorT, class FunctionT>
> FunctionT for_each(IteratorT first, IteratorT last, FunctionT
func) {
> for ( ; first != last; ++first)
> func(*first);
> return func;
> }
> This is a full fledged STL functor based *solely* on STL concepts.
> Now rewrite that in MPL using *solely* abstract MPL concepts without
> including anything. You can't because MPL algorithms rely a lot on
> MPL infrastructure.

Just to offer a little more perspective: the STL has some infrastructure
of its own. For example, there is std::iterator_traits<>, which is
needed for writing some algorithms. Granted, the MPL infrastructure
shows up more often because there are no simple


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