MPL Lite or MPL2
by Robert Ramey
Recently there has been discussion on the Developer’s mailing list regarding the status, maintenance (or lack thereof), and improvement of Boost MPL by Alexi Gurtovoy and David Abrahams.
This is a pivotal library in boost and is use by many other libraries including the serialization library. It was made around 2003 includes much hacking to support many obsolete and defective compilers. It is currently very hard to maintain and there is not person currently specifically responsible for it. Your task, should you choose to accept would be to make a modern version of this library which can be used as a drop-in replacement for the original. At first glance, this task may be considered daunting.
* it’s a very large and comprehensive library with many components
* it employs the most obscure template meta programming tricks.
* The current version was written by a pair of the most talented C++ programmers on the planet. It took them many months of work. (They also wrote a book on the subject!)
On the other hand, there are factors which mitigate the difficulty here:
* the table of contents of the documentation http://www.boost.org/doc/libs/1_57_0/libs/mpl/doc/refmanual.html gives a good idea of the library. I think one could restrict the effort to the most widely used subset – Metafunctions and maybe Data Types. This is much smaller and simpler than the whole library. The functionality for sequences, iterators, and algorithms could be left for later. Hence the proposal is called MPL Lite. Besides making the job more doable, limiting the scope in this way would make the library something that would be more likely to be eventually included as part of the C++ standard library. After all, the standard library includes type_traits (from boost). Inclusion of metafunctions to use the type_traits seems natural and compelling. So – limit the library to metafunctions.
* Since it’s a drop-in replacement, all the library tests should pass with the new code. That is, you don’t have to re-write all the tests. This long, tedious part of the task is already done for you!
* Similarly, the documentation is already done for you. Just excise the relevant documentation and bring up to date with Boost Book.
So here we have a doable task which would be really useful to the Boost and C++ community.
As far as the type list (sequences, iterators, algorithms) part of the library, these can be left for later. Or more likely these might be broken out info another library and/or included as part of some other library such as fusion.
There are 0 comments