Boost logo

Boost Users :

Subject: Re: [Boost-users] [MPL][Config] Can no longer pre-generate headers for MPL-containers with more than 50 elements.
From: Deniz Bahadir (dbahadir_at_[hidden])
Date: 2015-04-14 09:21:12


Am 10.04.2015 um 20:03 schrieb John Maddock:
>
> OK, I've got it working on Xubuntu (still no joy in cygwin).
>
> I can confirm that it works in 1.55 but is broken in 1.56. Also that
> the breakage is somewhere in the MPL headers.
>
> I've tried reverting one change at a time (see
> https://github.com/boostorg/mpl/compare/boost-1.55.0...boost-1.56.0),
> but for some reason still couldn't narrow it down. Anyone any ideas?
>

I was able to hunt the error down. (More further down.)

*Short Excursus*

For convenience I converted my bash-script ([1]) into a python-script
([2]) and extended it with some more functionality.
I suppose, it should work on all platforms (even Windows ;-)) that have
a working python environment enabled.
(I would recommend, that this script will be incorporated into Boost.MPL.)

This new python-script helped me a lot in understanding what is going on
and why the pre-processing started failing from Boost 1.56 on.

*Problem*

The problem seems to be that some helper python-script ([3]) relies on
the format of input headers, which seems to have changed during the
migration from SVN to Git.
SVN seemed to put some information about author, change-date and
file-name ([4]) in the header-comments of each Boost source/header file.

Nowadays, these header-comments are empty and [3] is therefore unable to
determine which part to process/copy. (The interesting regex can be
found in line 148 of [3].)

*Possible Solution*

A simple solution would be to manually add at least the filename in the
header-comments of files [5] and [6].

However, a better and cleaner approach would be, if Git would
automatically add this information (or [3] could be changed in such a
way that it determines the beginning of the correct file by some other
means.)

*Conclusion*

For the first, simple solution I could make the changes myself and make
a pull-request. (Thereby, I would also provide my new python
helper-script ([2])).
However, for the better, cleaner approach someone else should do these
changes.

Any suggestions?

Deniz

References:

[1] http://stackoverflow.com/a/20660264/3115457
[2] http://stackoverflow.com/a/29627158/3115457
[3] ${BOOST_SOURCE}/libs/mpl/preprocessed/pp.py
[4] "// $Id: list50.cpp 49268 2008-10-11 06:26:17Z agurtovoy $"
[5] ${BOOST_SOURCE}/boost/mpl/${CONTAINER}/${CONTAINER}${NUM}.hpp
[6] ${BOOST_SOURCE}/boost/mpl/${CONTAINER}/${CONTAINER}${NUM}_c.hpp


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net