Hi All,
I am going through Chapter 3 of the MPL book ("A Deeper Look at
Metafunctions") and have some questions on the placeholders _1 and _2.
They are first introduced in the section 3.1.5 as follows:
typename mpl::transform >::type
I understand from the context that _1 represents D1 and _2 represents
D2. From this I understood that _1 will represent the first template
argument and _2 will represent the 2nd template argument. This made
sense in this context. But later I came across the following in
section 3.3:
template <class X>
struct two_pointers
: twice, X>
{};
In this context, it looks like _1 represents X, which is the 2nd
template argument. So what exactly _1 and _2 represents? The book
doesn't seem to define them. While I haven't completely read the book
yet, if it is defined at some other place, it would have been helpful
to provide a cross-reference when they are first introduced in chapter
3.
Can anybody provide a reference that explains what is a placeholder
and what _1 and _2 mean? And what is the maximum number of
placeholders?
Thank you.
Rgds,
anna
--
Two Party Fraud: Staged Presidential Debates
http://missingrainbow.blogspot.com/2008/10/two-party-fraud-staged-presidenti...