#3868 closed Bugs (fixed)
bimap build fails without serialization library
Reported by: | 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 #include
s within #ifndef
s:
-
detail/set_view_iterator.hpp
19 19 #include <boost/config.hpp> 20 20 21 21 // Boost 22 #include <boost/serialization/nvp.hpp> 22 #ifndef BOOST_BIMAP_DISABLE_SERIALIZATION 23 #include <boost/serialization/nvp.hpp> 24 #endif 23 25 #include <boost/iterator/detail/enable_if.hpp> 24 26 #include <boost/iterator/iterator_adaptor.hpp> 25 27 #include <boost/bimap/relation/support/get_pair_functor.hpp> -
detail/map_view_iterator.hpp
19 19 #include <boost/config.hpp> 20 20 21 21 // Boost 22 #include <boost/serialization/nvp.hpp> 22 #ifndef BOOST_BIMAP_DISABLE_SERIALIZATION 23 #include <boost/serialization/nvp.hpp> 24 #endif 23 25 #include <boost/iterator/detail/enable_if.hpp> 24 26 #include <boost/iterator/iterator_adaptor.hpp> 25 27 #include <boost/bimap/relation/support/pair_by.hpp> -
relation/mutant_relation.hpp
21 21 #include <boost/mpl/vector.hpp> 22 22 #include <boost/operators.hpp> 23 23 #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 25 27 26 28 #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
55 55 56 56 #ifndef BOOST_BIMAP_DISABLE_SERIALIZATION 57 57 #include <boost/serialization/nvp.hpp> 58 #else 59 #include <boost/throw_exception.hpp> 58 60 #endif // BOOST_BIMAP_DISABLE_SERIALIZATION 59 61 60 62 // Boost.Bimap
Note:
See TracTickets
for help on using tickets.
(In [78154]) [Bimap] Remove spurious dependency on Boost.Serialization (Fix #3868)