Boost C++ Libraries: Ticket #11224: Pre-processing / Pre-generating MPL-containers stopped working https://svn.boost.org/trac10/ticket/11224 <h2 class="section" id="Background">Background</h2> <p> Boost.MPL allows to pre-process / pre-generate headers for MPL-containers (<code>vector</code>, <code>list</code>, <code>set</code>, <code>map</code>). In particular, headers for containers in <em>variadic</em> and <em>numbered</em> form can be pre-generated. For that, Boost.MPL comes with some python-scripts, located in subdirectory "libs/mpl/preprocessed/" of the Boost-source directory. (As a side-note: Documentation for these python-scripts is missing.) </p> <p> By default, Boost comes with pre-generated headers for MPL-containers that are able to hold up to 50 elements. Using the mentioned python-files it is possible to generate MPL-containers that can hold even more elements. </p> <h2 class="section" id="Problem">Problem</h2> <p> Since release of Boost 1.56.0 the pre-generation of headers for MPL-containers does not work anymore. </p> <h2 class="section" id="Explanation">Explanation</h2> <p> One of the python-scripts used for pre-generation ("<code>pp.py</code>") requires certain information to be found in the header-comments of input-headers. In particular, it required the field <code>$Id$</code> in the header-comment to contain the filename (followed by some additional non-whitespace characters), which it no longer does in release 1.56.0 and newer Boost releases. </p> <p> <code>$Id$</code> is a Subversion substitution-keyword. (See: <code>[http]://svnbook.red-bean.com/en/1.7/svn-book.html#svn.advanced.props.special.keywords</code>) </p> <p> I assume, Boost switched from Subversion to Git before releasing Boost 1.56.0. That would explain why the keyword-substition did no longer work. </p> <h2 class="section" id="Solution">Solution</h2> <p> To make the python-scripts work again, the best solution would be to also make the keyword-substitution work together with Git. However, as this is neither simple nor recommended (see: <code>[https]://git.wiki.kernel.org/index.php/Git_FAQ#Does_Git_have_keyword_expansion.3F</code>) one should probably add the missing information into the header-comments directly before pre-generation. </p> <p> The attached python-script "<code>fix_boost_mpl_preprocess.py</code>" is able to do that. The attached python-script "<code>boost_mpl_preprocess.py</code>" can then be used as a comfortable helper-script for pre-generating. </p> <h2 class="section" id="AdditionalInformation">Additional Information</h2> <p> Explanation for both scripts on Stackoverflow:<br /> <code>[http]://stackoverflow.com/a/29627158/3115457</code> </p> <p> Discussion regarding this problem on the boost-users mailing-list:<br /> <code>[http]://thread.gmane.org/gmane.comp.lib.boost.user/83794</code> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11224 Trac 1.4.3 Deniz Bahadir <deniz.bahadir@…> Wed, 22 Apr 2015 09:47:36 GMT attachment set https://svn.boost.org/trac10/ticket/11224 https://svn.boost.org/trac10/ticket/11224 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">fix_boost_mpl_preprocess.py</span> </li> </ul> <p> Python-script which fixes the header-comments. </p> Ticket Deniz Bahadir <deniz.bahadir@…> Wed, 22 Apr 2015 09:51:21 GMT attachment set https://svn.boost.org/trac10/ticket/11224 https://svn.boost.org/trac10/ticket/11224 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_mpl_preprocess.py</span> </li> </ul> <p> Python helper-script that simplifies pre-generation of MPL-containers. </p> Ticket Deniz Bahadir <deniz.bahadir@…> Wed, 22 Apr 2015 11:27:46 GMT attachment set https://svn.boost.org/trac10/ticket/11224 https://svn.boost.org/trac10/ticket/11224 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_mpl_preprocess.2.py</span> </li> </ul> <p> Fixed version of script "boost_mpl_preprocess.py". </p> Ticket Deniz Bahadir <deniz.bahadir@…> Wed, 22 Apr 2015 11:35:15 GMT <link>https://svn.boost.org/trac10/ticket/11224#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11224#comment:1</guid> <description> <p> Please note: </p> <p> The first attached version of script "<code>boost_mpl_preprocess.py</code>" had a small error in some of its regex-patterns.<br /> I fixed that problem and attached it again. It got the name "<code>boost_mpl_preprocess.2.py</code>". </p> </description> <category>Ticket</category> </item> <item> <author>Deniz Bahadir <deniz.bahadir@…></author> <pubDate>Wed, 22 Apr 2015 12:11:13 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11224#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11224#comment:2</guid> <description> <p> I added a pull-request with the required changes, that already incorporates the two scripts. </p> <p> <code>[https]://github.com/boostorg/mpl/pull/20</code> </p> </description> <category>Ticket</category> </item> </channel> </rss>