Opened 13 years ago

Closed 11 years ago

Last modified 10 years ago

#3868 closed Bugs (fixed)

bimap build fails without serialization library

Reported by: jdsiiro@… Owned by: Matias Capeletto
Milestone: Boost 1.42.0 Component: bimap
Version: Boost 1.41.0 Severity: Problem
Keywords: Cc:

Description

Builds including Bimap fail unless the Serialization library is present (even when defining BOOST_BIMAP_DISABLE_SERIALIZATION). This is caused by a reference to a missing header file (boost/serialization/nvp.hpp). A fix appears to be to guard those #includes within #ifndefs:

  • detail/set_view_iterator.hpp

     
    1919#include <boost/config.hpp>
    2020
    2121// Boost
    22 #include <boost/serialization/nvp.hpp>
     22#ifndef BOOST_BIMAP_DISABLE_SERIALIZATION
     23    #include <boost/serialization/nvp.hpp>
     24#endif
    2325#include <boost/iterator/detail/enable_if.hpp>
    2426#include <boost/iterator/iterator_adaptor.hpp>
    2527#include <boost/bimap/relation/support/get_pair_functor.hpp>
  • detail/map_view_iterator.hpp

     
    1919#include <boost/config.hpp>
    2020
    2121// Boost
    22 #include <boost/serialization/nvp.hpp>
     22#ifndef BOOST_BIMAP_DISABLE_SERIALIZATION
     23    #include <boost/serialization/nvp.hpp>
     24#endif
    2325#include <boost/iterator/detail/enable_if.hpp>
    2426#include <boost/iterator/iterator_adaptor.hpp>
    2527#include <boost/bimap/relation/support/pair_by.hpp>
  • relation/mutant_relation.hpp

     
    2121#include <boost/mpl/vector.hpp>
    2222#include <boost/operators.hpp>
    2323#include <boost/call_traits.hpp>
    24 #include <boost/serialization/nvp.hpp>
     24#ifndef BOOST_BIMAP_DISABLE_SERIALIZATION
     25    #include <boost/serialization/nvp.hpp>
     26#endif
    2527
    2628#include <boost/functional/hash/hash.hpp>

In addition, this exposes a missing dependence on boost/throw_exception.hpp that can be resolved (albeit, non-ideally) through the following:

  • bimap.hpp

     
    5555
    5656#ifndef BOOST_BIMAP_DISABLE_SERIALIZATION
    5757    #include <boost/serialization/nvp.hpp>
     58#else
     59    #include <boost/throw_exception.hpp>
    5860#endif // BOOST_BIMAP_DISABLE_SERIALIZATION
    5961
    6062// Boost.Bimap

Change History (2)

comment:1 by Matias Capeletto, 11 years ago

Resolution: fixed
Status: newclosed

(In [78154]) [Bimap] Remove spurious dependency on Boost.Serialization (Fix #3868)

comment:2 by Matias Capeletto, 10 years ago

(In [78573]) [Bimap] Merge to release ( [78154] Fix #3868, [78159] Fix #5749 )

Note: See TracTickets for help on using tickets.