correct for STLPort

[SVN r33536]
This commit is contained in:
Robert Ramey
2006-04-05 04:52:27 +00:00
parent ccce8f7fdd
commit aa4aa23be3
4 changed files with 70 additions and 64 deletions

View File

@@ -28,12 +28,13 @@
// function specializations must be defined in the appropriate
// namespace - boost::serialization
/*
#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
#define STD _STLP_STD
#else
#define STD BOOST_STD_EXTENSION_NAMESPACE
#endif
*/
namespace boost {
namespace serialization {
@@ -46,14 +47,14 @@ template<
>
inline void save(
Archive & ar,
const STD::hash_map<
const BOOST_STD_EXTENSION_NAMESPACE::hash_map<
Key, HashFcn, EqualKey, Allocator
> &t,
const unsigned int file_version
){
boost::serialization::stl::save_hash_collection<
Archive,
STD::hash_map<
BOOST_STD_EXTENSION_NAMESPACE::hash_map<
Key, HashFcn, EqualKey, Allocator
>
>(ar, t);
@@ -68,19 +69,19 @@ template<
>
inline void load(
Archive & ar,
STD::hash_map<
BOOST_STD_EXTENSION_NAMESPACE::hash_map<
Key, HashFcn, EqualKey, Allocator
> &t,
const unsigned int file_version
){
boost::serialization::stl::load_hash_collection<
Archive,
STD::hash_map<
BOOST_STD_EXTENSION_NAMESPACE::hash_map<
Key, HashFcn, EqualKey, Allocator
>,
boost::serialization::stl::archive_input_unique<
Archive,
STD::hash_map<
BOOST_STD_EXTENSION_NAMESPACE::hash_map<
Key, HashFcn, EqualKey, Allocator
>
>
@@ -98,7 +99,7 @@ template<
>
inline void serialize(
Archive & ar,
STD::hash_map<
BOOST_STD_EXTENSION_NAMESPACE::hash_map<
Key, HashFcn, EqualKey, Allocator
> &t,
const unsigned int file_version
@@ -116,14 +117,14 @@ template<
>
inline void save(
Archive & ar,
const STD::hash_multimap<
const BOOST_STD_EXTENSION_NAMESPACE::hash_multimap<
Key, HashFcn, EqualKey, Allocator
> &t,
const unsigned int file_version
){
boost::serialization::stl::save_hash_collection<
Archive,
STD::hash_multimap<
BOOST_STD_EXTENSION_NAMESPACE::hash_multimap<
Key, HashFcn, EqualKey, Allocator
>
>(ar, t);
@@ -138,19 +139,19 @@ template<
>
inline void load(
Archive & ar,
STD::hash_multimap<
BOOST_STD_EXTENSION_NAMESPACE::hash_multimap<
Key, HashFcn, EqualKey, Allocator
> &t,
const unsigned int file_version
){
boost::serialization::stl::load_hash_collection<
Archive,
STD::hash_multimap<
BOOST_STD_EXTENSION_NAMESPACE::hash_multimap<
Key, HashFcn, EqualKey, Allocator
>,
boost::serialization::stl::archive_input_multi<
Archive,
STD::hash_multimap<
BOOST_STD_EXTENSION_NAMESPACE::hash_multimap<
Key, HashFcn, EqualKey, Allocator
>
>
@@ -168,7 +169,7 @@ template<
>
inline void serialize(
Archive & ar,
STD::hash_multimap<
BOOST_STD_EXTENSION_NAMESPACE::hash_multimap<
Key, HashFcn, EqualKey, Allocator
> &t,
const unsigned int file_version
@@ -179,7 +180,7 @@ inline void serialize(
} // namespace serialization
} // namespace boost
#undef STD
//#undef STD
#endif // BOOST_HAS_HASH
#endif // BOOST_SERIALIZATION_HASH_MAP_HPP

View File

@@ -26,11 +26,13 @@
// function specializations must be defined in the appropriate
// namespace - boost::serialization
/*
#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
#define STD _STLP_STD
#define std _STLP_std
#else
#define STD BOOST_STD_EXTENSION_NAMESPACE
#define std BOOST_std_EXTENSION_NAMESPACE
#endif
*/
namespace boost {
namespace serialization {
@@ -44,14 +46,14 @@ template<
>
inline void save(
Archive & ar,
const STD::hash_set<
const BOOST_STD_EXTENSION_NAMESPACE::hash_set<
Key, HashFcn, EqualKey, Allocator
> &t,
const unsigned int file_version
){
boost::serialization::stl::save_hash_collection<
Archive,
STD::hash_set<
BOOST_STD_EXTENSION_NAMESPACE::hash_set<
Key, HashFcn, EqualKey, Allocator
>
>(ar, t);
@@ -66,19 +68,19 @@ template<
>
inline void load(
Archive & ar,
STD::hash_set<
BOOST_STD_EXTENSION_NAMESPACE::hash_set<
Key, HashFcn, EqualKey, Allocator
> &t,
const unsigned int file_version
){
boost::serialization::stl::load_hash_collection<
Archive,
STD::hash_set<
BOOST_STD_EXTENSION_NAMESPACE::hash_set<
Key, HashFcn, EqualKey, Allocator
>,
boost::serialization::stl::archive_input_unique<
Archive,
STD::hash_set<
BOOST_STD_EXTENSION_NAMESPACE::hash_set<
Key, HashFcn, EqualKey, Allocator
>
>
@@ -96,7 +98,7 @@ template<
>
inline void serialize(
Archive & ar,
STD::hash_set<
BOOST_STD_EXTENSION_NAMESPACE::hash_set<
Key, HashFcn, EqualKey, Allocator
> &t,
const unsigned int file_version
@@ -114,14 +116,14 @@ template<
>
inline void save(
Archive & ar,
const STD::hash_multiset<
const BOOST_STD_EXTENSION_NAMESPACE::hash_multiset<
Key, HashFcn, EqualKey, Allocator
> &t,
const unsigned int file_version
){
boost::serialization::stl::save_hash_collection<
Archive,
STD::hash_multiset<
BOOST_STD_EXTENSION_NAMESPACE::hash_multiset<
Key, HashFcn, EqualKey, Allocator
>
>(ar, t);
@@ -136,19 +138,19 @@ template<
>
inline void load(
Archive & ar,
STD::hash_multiset<
BOOST_STD_EXTENSION_NAMESPACE::hash_multiset<
Key, HashFcn, EqualKey, Allocator
> &t,
const unsigned int file_version
){
boost::serialization::stl::load_hash_collection<
Archive,
STD::hash_multiset<
BOOST_STD_EXTENSION_NAMESPACE::hash_multiset<
Key, HashFcn, EqualKey, Allocator
>,
boost::serialization::stl::archive_input_multi<
Archive,
STD::hash_multiset<
BOOST_STD_EXTENSION_NAMESPACE::hash_multiset<
Key, HashFcn, EqualKey, Allocator
>
>
@@ -166,7 +168,7 @@ template<
>
inline void serialize(
Archive & ar,
STD::hash_multiset<
BOOST_STD_EXTENSION_NAMESPACE::hash_multiset<
Key, HashFcn, EqualKey, Allocator
> & t,
const unsigned int file_version
@@ -179,10 +181,10 @@ inline void serialize(
#include <boost/serialization/collection_traits.hpp>
BOOST_SERIALIZATION_COLLECTION_TRAITS(STD::hash_set)
BOOST_SERIALIZATION_COLLECTION_TRAITS(STD::hash_multiset)
BOOST_SERIALIZATION_COLLECTION_TRAITS(BOOST_STD_EXTENSION_NAMESPACE::hash_set)
BOOST_SERIALIZATION_COLLECTION_TRAITS(BOOST_STD_EXTENSION_NAMESPACE::hash_multiset)
#undef STD
//#undef STD
#endif // BOOST_HAS_HASH
#endif // BOOST_SERIALIZATION_HASH_SET_HPP

View File

@@ -28,39 +28,40 @@
// function specializations must be defined in the appropriate
// namespace - boost::serialization
/*
#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
#define STD _STLP_STD
#else
#define STD std
#endif
*/
namespace boost {
namespace serialization {
template<class Archive, class Type, class Key, class Compare, class Allocator >
inline void save(
Archive & ar,
const STD::map<Key, Type, Compare, Allocator> &t,
const std::map<Key, Type, Compare, Allocator> &t,
const unsigned int /* file_version */
){
boost::serialization::stl::save_collection<
Archive,
STD::map<Key, Type, Compare, Allocator>
std::map<Key, Type, Compare, Allocator>
>(ar, t);
}
template<class Archive, class Type, class Key, class Compare, class Allocator >
inline void load(
Archive & ar,
STD::map<Key, Type, Compare, Allocator> &t,
std::map<Key, Type, Compare, Allocator> &t,
const unsigned int /* file_version */
){
boost::serialization::stl::load_collection<
Archive,
STD::map<Key, Type, Compare, Allocator>,
std::map<Key, Type, Compare, Allocator>,
boost::serialization::stl::archive_input_unique<
Archive, STD::map<Key, Type, Compare, Allocator> >,
boost::serialization::stl::no_reserve_imp<STD::map<
Archive, std::map<Key, Type, Compare, Allocator> >,
boost::serialization::stl::no_reserve_imp<std::map<
Key, Type, Compare, Allocator
>
>
@@ -72,7 +73,7 @@ inline void load(
template<class Archive, class Type, class Key, class Compare, class Allocator >
inline void serialize(
Archive & ar,
STD::map<Key, Type, Compare, Allocator> &t,
std::map<Key, Type, Compare, Allocator> &t,
const unsigned int file_version
){
boost::serialization::split_free(ar, t, file_version);
@@ -82,29 +83,29 @@ inline void serialize(
template<class Archive, class Type, class Key, class Compare, class Allocator >
inline void save(
Archive & ar,
const STD::multimap<Key, Type, Compare, Allocator> &t,
const std::multimap<Key, Type, Compare, Allocator> &t,
const unsigned int /* file_version */
){
boost::serialization::stl::save_collection<
Archive,
STD::multimap<Key, Type, Compare, Allocator>
std::multimap<Key, Type, Compare, Allocator>
>(ar, t);
}
template<class Archive, class Type, class Key, class Compare, class Allocator >
inline void load(
Archive & ar,
STD::multimap<Key, Type, Compare, Allocator> &t,
std::multimap<Key, Type, Compare, Allocator> &t,
const unsigned int /* file_version */
){
boost::serialization::stl::load_collection<
Archive,
STD::multimap<Key, Type, Compare, Allocator>,
std::multimap<Key, Type, Compare, Allocator>,
boost::serialization::stl::archive_input_multi<
Archive, STD::multimap<Key, Type, Compare, Allocator>
Archive, std::multimap<Key, Type, Compare, Allocator>
>,
boost::serialization::stl::no_reserve_imp<
STD::multimap<Key, Type, Compare, Allocator>
std::multimap<Key, Type, Compare, Allocator>
>
>(ar, t);
}
@@ -114,7 +115,7 @@ inline void load(
template<class Archive, class Type, class Key, class Compare, class Allocator >
inline void serialize(
Archive & ar,
STD::multimap<Key, Type, Compare, Allocator> &t,
std::multimap<Key, Type, Compare, Allocator> &t,
const unsigned int file_version
){
boost::serialization::split_free(ar, t, file_version);
@@ -123,6 +124,6 @@ inline void serialize(
} // serialization
} // namespace boost
#undef STD
//#undef STD
#endif // BOOST_SERIALIZATION_MAP_HPP

View File

@@ -24,11 +24,13 @@
#include <boost/serialization/collections_load_imp.hpp>
#include <boost/serialization/split_free.hpp>
/*
#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
#define STD _STLP_STD
#else
#define STD std
#endif
*/
namespace boost {
namespace serialization {
@@ -36,27 +38,27 @@ namespace serialization {
template<class Archive, class Key, class Compare, class Allocator >
inline void save(
Archive & ar,
const STD::set<Key, Compare, Allocator> &t,
const std::set<Key, Compare, Allocator> &t,
const unsigned int /* file_version */
){
boost::serialization::stl::save_collection<
Archive, STD::set<Key, Compare, Allocator>
Archive, std::set<Key, Compare, Allocator>
>(ar, t);
}
template<class Archive, class Key, class Compare, class Allocator >
inline void load(
Archive & ar,
STD::set<Key, Compare, Allocator> &t,
std::set<Key, Compare, Allocator> &t,
const unsigned int /* file_version */
){
boost::serialization::stl::load_collection<
Archive,
STD::set<Key, Compare, Allocator>,
std::set<Key, Compare, Allocator>,
boost::serialization::stl::archive_input_unique<
Archive, STD::set<Key, Compare, Allocator>
Archive, std::set<Key, Compare, Allocator>
>,
boost::serialization::stl::no_reserve_imp<STD::set<
boost::serialization::stl::no_reserve_imp<std::set<
Key, Compare, Allocator>
>
>(ar, t);
@@ -67,7 +69,7 @@ inline void load(
template<class Archive, class Key, class Compare, class Allocator >
inline void serialize(
Archive & ar,
STD::set<Key, Compare, Allocator> & t,
std::set<Key, Compare, Allocator> & t,
const unsigned int file_version
){
boost::serialization::split_free(ar, t, file_version);
@@ -77,29 +79,29 @@ inline void serialize(
template<class Archive, class Key, class Compare, class Allocator >
inline void save(
Archive & ar,
const STD::multiset<Key, Compare, Allocator> &t,
const std::multiset<Key, Compare, Allocator> &t,
const unsigned int /* file_version */
){
boost::serialization::stl::save_collection<
Archive,
STD::multiset<Key, Compare, Allocator>
std::multiset<Key, Compare, Allocator>
>(ar, t);
}
template<class Archive, class Key, class Compare, class Allocator >
inline void load(
Archive & ar,
STD::multiset<Key, Compare, Allocator> &t,
std::multiset<Key, Compare, Allocator> &t,
const unsigned int /* file_version */
){
boost::serialization::stl::load_collection<
Archive,
STD::multiset<Key, Compare, Allocator>,
std::multiset<Key, Compare, Allocator>,
boost::serialization::stl::archive_input_multi<
Archive, STD::multiset<Key, Compare, Allocator>
Archive, std::multiset<Key, Compare, Allocator>
>,
boost::serialization::stl::no_reserve_imp<
STD::multiset<Key, Compare, Allocator>
std::multiset<Key, Compare, Allocator>
>
>(ar, t);
}
@@ -109,7 +111,7 @@ inline void load(
template<class Archive, class Key, class Compare, class Allocator >
inline void serialize(
Archive & ar,
STD::multiset<Key, Compare, Allocator> & t,
std::multiset<Key, Compare, Allocator> & t,
const unsigned int file_version
){
boost::serialization::split_free(ar, t, file_version);
@@ -120,8 +122,8 @@ inline void serialize(
#include <boost/serialization/collection_traits.hpp>
BOOST_SERIALIZATION_COLLECTION_TRAITS(STD::set)
BOOST_SERIALIZATION_COLLECTION_TRAITS(STD::multiset)
#undef STD
BOOST_SERIALIZATION_COLLECTION_TRAITS(std::set)
BOOST_SERIALIZATION_COLLECTION_TRAITS(std::multiset)
//#undef STD
#endif // BOOST_SERIALIZATION_SET_HPP