Boost C++ Libraries: Ticket #3868: bimap build fails without serialization library https://svn.boost.org/trac10/ticket/3868 <p> Builds including Bimap fail unless the Serialization library is present (even when defining <code>BOOST_BIMAP_DISABLE_SERIALIZATION</code>). This is caused by a reference to a missing header file (<code>boost/serialization/nvp.hpp</code>). A fix appears to be to guard those <code>#include</code>s within <code>#ifndef</code>s: </p> <div class="wiki-code"> <div class="diff"> <ul class="entries"> <li class="entry"> <h2> <a>detail/set_view_iterator.hpp</a> </h2> <table class="trac-diff inline" cellspacing="0"> <colgroup> <col class="lineno"/><col class="lineno"/><col class="content"/> </colgroup> <thead> <tr> <th title="File detail/set_view_iterator.hpp (revision 2317)"> </th> <th title="File detail/set_view_iterator.hpp (working copy)"> </th> <td> <em></em> &nbsp; </td> </tr> </thead> <tbody class="unmod"> <tr> <th>19</th><th>19</th><td class="l"><span>#include &lt;boost/config.hpp&gt;</span></td> </tr> <tr> <th>20</th><th>20</th><td class="l"><span></span></td> </tr> <tr> <th>21</th><th>21</th><td class="l"><span>// Boost</span></td> </tr> </tbody> <tbody class="mod"> <tr class="first"> <th>22</th><th>&nbsp;</th><td class="l"><span>#include &lt;boost/serialization/nvp.hpp&gt;</span></td> </tr> <tr> <th>&nbsp;</th><th>22</th><td class="r"><span>#ifndef BOOST_BIMAP_DISABLE_SERIALIZATION</span></td> </tr> <tr> <th>&nbsp;</th><th>23</th><td class="r"><span>&nbsp; &nbsp; #include &lt;boost/serialization/nvp.hpp&gt;</span></td> </tr> <tr class="last"> <th>&nbsp;</th><th>24</th><td class="r"><span>#endif</span></td> </tr> </tbody> <tbody class="unmod"> <tr> <th>23</th><th>25</th><td class="l"><span>#include &lt;boost/iterator/detail/enable_if.hpp&gt;</span></td> </tr> <tr> <th>24</th><th>26</th><td class="l"><span>#include &lt;boost/iterator/iterator_adaptor.hpp&gt;</span></td> </tr> <tr> <th>25</th><th>27</th><td class="l"><span>#include &lt;boost/bimap/relation/support/get_pair_functor.hpp&gt;</span></td> </tr> </tbody> </table> </li> <li class="entry"> <h2> <a>detail/map_view_iterator.hpp</a> </h2> <table class="trac-diff inline" cellspacing="0"> <colgroup> <col class="lineno"/><col class="lineno"/><col class="content"/> </colgroup> <thead> <tr> <th title="File detail/map_view_iterator.hpp (revision 2317)"> </th> <th title="File detail/map_view_iterator.hpp (working copy)"> </th> <td> <em></em> &nbsp; </td> </tr> </thead> <tbody class="unmod"> <tr> <th>19</th><th>19</th><td class="l"><span>#include &lt;boost/config.hpp&gt;</span></td> </tr> <tr> <th>20</th><th>20</th><td class="l"><span></span></td> </tr> <tr> <th>21</th><th>21</th><td class="l"><span>// Boost</span></td> </tr> </tbody> <tbody class="mod"> <tr class="first"> <th>22</th><th>&nbsp;</th><td class="l"><span>#include &lt;boost/serialization/nvp.hpp&gt;</span></td> </tr> <tr> <th>&nbsp;</th><th>22</th><td class="r"><span>#ifndef BOOST_BIMAP_DISABLE_SERIALIZATION</span></td> </tr> <tr> <th>&nbsp;</th><th>23</th><td class="r"><span>&nbsp; &nbsp; #include &lt;boost/serialization/nvp.hpp&gt;</span></td> </tr> <tr class="last"> <th>&nbsp;</th><th>24</th><td class="r"><span>#endif</span></td> </tr> </tbody> <tbody class="unmod"> <tr> <th>23</th><th>25</th><td class="l"><span>#include &lt;boost/iterator/detail/enable_if.hpp&gt;</span></td> </tr> <tr> <th>24</th><th>26</th><td class="l"><span>#include &lt;boost/iterator/iterator_adaptor.hpp&gt;</span></td> </tr> <tr> <th>25</th><th>27</th><td class="l"><span>#include &lt;boost/bimap/relation/support/pair_by.hpp&gt;</span></td> </tr> </tbody> </table> </li> <li class="entry"> <h2> <a>relation/mutant_relation.hpp</a> </h2> <table class="trac-diff inline" cellspacing="0"> <colgroup> <col class="lineno"/><col class="lineno"/><col class="content"/> </colgroup> <thead> <tr> <th title="File relation/mutant_relation.hpp (revision 2317)"> </th> <th title="File relation/mutant_relation.hpp (working copy)"> </th> <td> <em></em> &nbsp; </td> </tr> </thead> <tbody class="unmod"> <tr> <th>21</th><th>21</th><td class="l"><span>#include &lt;boost/mpl/vector.hpp&gt;</span></td> </tr> <tr> <th>22</th><th>22</th><td class="l"><span>#include &lt;boost/operators.hpp&gt;</span></td> </tr> <tr> <th>23</th><th>23</th><td class="l"><span>#include &lt;boost/call_traits.hpp&gt;</span></td> </tr> </tbody> <tbody class="mod"> <tr class="first"> <th>24</th><th>&nbsp;</th><td class="l"><span>#include &lt;boost/serialization/nvp.hpp&gt;</span></td> </tr> <tr> <th>&nbsp;</th><th>24</th><td class="r"><span>#ifndef BOOST_BIMAP_DISABLE_SERIALIZATION</span></td> </tr> <tr> <th>&nbsp;</th><th>25</th><td class="r"><span>&nbsp; &nbsp; #include &lt;boost/serialization/nvp.hpp&gt;</span></td> </tr> <tr class="last"> <th>&nbsp;</th><th>26</th><td class="r"><span>#endif</span></td> </tr> </tbody> <tbody class="unmod"> <tr> <th>25</th><th>27</th><td class="l"><span></span></td> </tr> <tr> <th>26</th><th>28</th><td class="l"><span>#include &lt;boost/functional/hash/hash.hpp&gt;</span></td> </tr> </tbody> </table> </li> </ul> </div></div><p> In addition, this exposes a missing dependence on <code>boost/throw_exception.hpp</code> that can be resolved (albeit, non-ideally) through the following: </p> <div class="wiki-code"> <div class="diff"> <ul class="entries"> <li class="entry"> <h2> <a>bimap.hpp</a> </h2> <table class="trac-diff inline" cellspacing="0"> <colgroup> <col class="lineno"/><col class="lineno"/><col class="content"/> </colgroup> <thead> <tr> <th title="File bimap.hpp (revision 2317)"> </th> <th title="File bimap.hpp (working copy)"> </th> <td> <em></em> &nbsp; </td> </tr> </thead> <tbody class="unmod"> <tr> <th>55</th><th>55</th><td class="l"><span></span></td> </tr> <tr> <th>56</th><th>56</th><td class="l"><span>#ifndef BOOST_BIMAP_DISABLE_SERIALIZATION</span></td> </tr> <tr> <th>57</th><th>57</th><td class="l"><span>&nbsp; &nbsp; #include &lt;boost/serialization/nvp.hpp&gt;</span></td> </tr> </tbody> <tbody class="add"> <tr class="first"> <th>&nbsp;</th><th>58</th><td class="r"><ins>#else</ins></td> </tr> <tr class="last"> <th>&nbsp;</th><th>59</th><td class="r"><ins>&nbsp; &nbsp; #include &lt;boost/throw_exception.hpp&gt;</ins></td> </tr> </tbody> <tbody class="unmod"> <tr> <th>58</th><th>60</th><td class="l"><span>#endif // BOOST_BIMAP_DISABLE_SERIALIZATION</span></td> </tr> <tr> <th>59</th><th>61</th><td class="l"><span></span></td> </tr> <tr> <th>60</th><th>62</th><td class="l"><span>// Boost.Bimap</span></td> </tr> </tbody> </table> </li> </ul> </div></div> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3868 Trac 1.4.3 Matias Capeletto Mon, 23 Apr 2012 10:16:39 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3868#comment:1 https://svn.boost.org/trac10/ticket/3868#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/78154" title="[Bimap] Remove spurious dependency on Boost.Serialization (Fix #3868)">[78154]</a>) [Bimap] Remove spurious dependency on Boost.Serialization (Fix <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3868" title="#3868: Bugs: bimap build fails without serialization library (closed: fixed)">#3868</a>) </p> Ticket Matias Capeletto Thu, 24 May 2012 08:31:49 GMT <link>https://svn.boost.org/trac10/ticket/3868#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3868#comment:2</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/78573" title="[Bimap] Merge to release ( [78154] Fix #3868, [78159] Fix #5749 )">[78573]</a>) [Bimap] Merge to release ( <a class="changeset" href="https://svn.boost.org/trac10/changeset/78154" title="[Bimap] Remove spurious dependency on Boost.Serialization (Fix #3868)">[78154]</a> Fix <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3868" title="#3868: Bugs: bimap build fails without serialization library (closed: fixed)">#3868</a>, <a class="changeset" href="https://svn.boost.org/trac10/changeset/78159" title="[Bimap] Solve unused constructor parameter warning (Fix 5749)">[78159]</a> Fix <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5749" title="#5749: Bugs: bimap: unused parameter warning in unconstrained_map_view constructor (closed: fixed)">#5749</a> ) </p> </description> <category>Ticket</category> </item> </channel> </rss>