Ovanes Markarian wrote:
Edward,
please see below.
On Wed, May 7, 2008 at 5:30 AM, Edward Diener
mailto:eldiener@tropicsoft.com> wrote: Ovanes Markarian wrote: > Edward, > > Just wanted to add my 2 cent. That might help. You need ::type when you > do type calculations. > For example: > > Access the type stored in a type sequence -> ::type
OK
> transform type sequence to another type sequence -> ::type
OK
> So meta-algorithms operate on types and result in new types -> ::type
There is nothing in the book or documentation reference about "meta-algorithms", whatever they are.
The authors of the book make an analogy between STL and MPL. Especially by introducing meta-functions which are algorithms. Take a look at chapter 6. 6.1. Algorithms, Idioms, Reuse, and Abstraction 6.2. Algorithms in MPL ...
MPL meta-functions like transform, sort, copy, remove, reverse, replace etc. are analogies to STL algorithms.
I understand what the algorithms of MPL are. You are saying that one always appends "::type" to the result of calling one of the MPL algorithms. That is one rule, which Steve also had already mentioned in a previous reply. So now I have some rules garnered from your and Steve's replies about when to append ::type when using MPL constructs. Thanks for your help. I still find the irregularity of when to use '::type' and when not to use '::type' the most difficult part of using MPL but at least I am further along than before.