
Arkadiy Vertleyb ha escrito:
How about just allowing any MPL sequence to specify the indices?
mpl_index_list does precisely this. Check the MPL part in the advanced topics section of the docs.
I think the question was why we need this intermediate class at all (or am I wrong?). No class -- no naming problem, and no need to provide the MPL wrapper (and no naming problem with the MPL wrapper). Just solving 3 problems in one shot :)
Why not use an MPL sequence of indexes in the first place?
Well, this has been previously discussed before. The rationale is that I'd like to isolate common users from MPL as much as possible. Imagine the tutorial somehow pointed to the MPL reference for a forward compile-time sequence: IMHO, many readers would scare away. Which percentage of *users* of Boost are acquainted with such a complex library as MPL? MPL is an extremely powerful library, but I honestly don't expect it to to be part of the common knowledge shared by the C++ community. Of course, this decision of mine is debatable. Consider also that the burden of adopting this approach is nearly negligible, namely adding an additional index specification construct for MPL-aware users. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo