Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/serialization/hash_set.hpp @ 101:c530137014c0
Update Boost headers (1.58.0)
author | Chris Cannam |
---|---|
date | Mon, 07 Sep 2015 11:12:49 +0100 |
parents | 2665513ce2d3 |
children |
comparison
equal
deleted
inserted
replaced
100:793467b5e61c | 101:c530137014c0 |
---|---|
1 #ifndef BOOST_SERIALIZATION_HASH_SET_HPP | 1 #ifndef BOOST_SERIALIZATION_HASH_SET_HPP |
2 #define BOOST_SERIALIZATION_HASH_SET_HPP | 2 #define BOOST_SERIALIZATION_HASH_SET_HPP |
3 | 3 |
4 // MS compatible compilers support #pragma once | 4 // MS compatible compilers support #pragma once |
5 #if defined(_MSC_VER) && (_MSC_VER >= 1020) | 5 #if defined(_MSC_VER) |
6 # pragma once | 6 # pragma once |
7 #endif | 7 #endif |
8 | 8 |
9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 | 9 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 |
10 // hash_set.hpp: serialization for stl hash_set templates | 10 // hash_set.hpp: serialization for stl hash_set templates |
36 inline void operator()( | 36 inline void operator()( |
37 Archive &ar, | 37 Archive &ar, |
38 Container &s, | 38 Container &s, |
39 const unsigned int v | 39 const unsigned int v |
40 ){ | 40 ){ |
41 typedef BOOST_DEDUCED_TYPENAME Container::value_type type; | 41 typedef typename Container::value_type type; |
42 detail::stack_construct<Archive, type> t(ar, v); | 42 detail::stack_construct<Archive, type> t(ar, v); |
43 // borland fails silently w/o full namespace | 43 // borland fails silently w/o full namespace |
44 ar >> boost::serialization::make_nvp("item", t.reference()); | 44 ar >> boost::serialization::make_nvp("item", t.reference()); |
45 std::pair<BOOST_DEDUCED_TYPENAME Container::const_iterator, bool> result = | 45 std::pair<typename Container::const_iterator, bool> result = |
46 s.insert(t.reference()); | 46 s.insert(t.reference()); |
47 if(result.second) | 47 if(result.second) |
48 ar.reset_object_address(& (* result.first), & t.reference()); | 48 ar.reset_object_address(& (* result.first), & t.reference()); |
49 } | 49 } |
50 }; | 50 }; |
56 inline void operator()( | 56 inline void operator()( |
57 Archive &ar, | 57 Archive &ar, |
58 Container &s, | 58 Container &s, |
59 const unsigned int v | 59 const unsigned int v |
60 ){ | 60 ){ |
61 typedef BOOST_DEDUCED_TYPENAME Container::value_type type; | 61 typedef typename Container::value_type type; |
62 detail::stack_construct<Archive, type> t(ar, v); | 62 detail::stack_construct<Archive, type> t(ar, v); |
63 // borland fails silently w/o full namespace | 63 // borland fails silently w/o full namespace |
64 ar >> boost::serialization::make_nvp("item", t.reference()); | 64 ar >> boost::serialization::make_nvp("item", t.reference()); |
65 BOOST_DEDUCED_TYPENAME Container::const_iterator result | 65 typename Container::const_iterator result |
66 = s.insert(t.reference()); | 66 = s.insert(t.reference()); |
67 ar.reset_object_address(& (* result), & t.reference()); | 67 ar.reset_object_address(& (* result), & t.reference()); |
68 } | 68 } |
69 }; | 69 }; |
70 | 70 |