mirror of
https://github.com/boostorg/serialization.git
synced 2026-02-23 16:02:13 +00:00
a) suppress warnings in some tests
b) break out test_forward_list c) fixe test operator new for mdvc
This commit is contained in:
@@ -29,14 +29,12 @@
|
||||
#else
|
||||
#define BOOST_ARCHIVE_DECL BOOST_SYMBOL_IMPORT
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_WARCHIVE_SOURCE)
|
||||
#define BOOST_WARCHIVE_DECL BOOST_SYMBOL_EXPORT
|
||||
#else
|
||||
#define BOOST_WARCHIVE_DECL BOOST_SYMBOL_IMPORT
|
||||
#endif
|
||||
#if !defined(BOOST_WARCHIVE_SOURCE) && !defined(BOOST_ARCHIVE_SOURCE)
|
||||
#define BOOST_ARCHIVE_OR_WARCHIVE_DECL BOOST_SYMBOL_IMPORT
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_WARCHIVE_SOURCE) || defined(BOOST_ARCHIVE_SOURCE)
|
||||
#define BOOST_ARCHIVE_OR_WARCHIVE_DECL BOOST_SYMBOL_EXPORT
|
||||
|
||||
@@ -225,15 +225,6 @@ struct heap_allocation {
|
||||
static T * invoke_new() {
|
||||
return static_cast<T *>((T::operator new)(sizeof(T)));
|
||||
}
|
||||
template<void D(void *, std::size_t)>
|
||||
static void deleter(void * t, std::size_t s){
|
||||
D(t, s);
|
||||
}
|
||||
|
||||
template<void D(void *)>
|
||||
static void deleter(void * t, std::size_t s){
|
||||
D(t);
|
||||
}
|
||||
static void invoke_delete(T * t) {
|
||||
// if compilation fails here, the likely cause that the class
|
||||
// T has a class specific new operator but no class specific
|
||||
@@ -243,7 +234,7 @@ struct heap_allocation {
|
||||
// that the class might have class specific new with NO
|
||||
// class specific delete at all. Patches (compatible with
|
||||
// C++03) welcome!
|
||||
deleter<T::operator delete>(t, sizeof(T));
|
||||
(operator delete)(t);
|
||||
}
|
||||
};
|
||||
struct doesnt_have_new_operator {
|
||||
|
||||
@@ -9,7 +9,11 @@
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#ifdef BOOST_NO_CXX11_HDR_CODECVT
|
||||
// std::codecvt_utf8 doesn't seem to work for msvc
|
||||
// versions prior to MSVC 14.0
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900 \
|
||||
|| defined( BOOST_NO_CXX11_HDR_CODECVT )
|
||||
#include <boost/archive/detail/decl.hpp>
|
||||
#define BOOST_UTF8_BEGIN_NAMESPACE \
|
||||
namespace boost { namespace archive { namespace detail {
|
||||
|
||||
@@ -41,7 +41,7 @@ template<class Archive, class U, class Allocator>
|
||||
inline void save(
|
||||
Archive & ar,
|
||||
const std::forward_list<U, Allocator> &t,
|
||||
const unsigned int file_version
|
||||
const unsigned int /*file_version*/
|
||||
){
|
||||
const collection_size_type count(std::distance(t.cbegin(), t.cend()));
|
||||
boost::serialization::stl::save_collection<
|
||||
@@ -90,7 +90,7 @@ template<class Archive, class U, class Allocator>
|
||||
inline void load(
|
||||
Archive & ar,
|
||||
std::forward_list<U, Allocator> &t,
|
||||
const unsigned int file_version
|
||||
const unsigned int /*file_version*/
|
||||
){
|
||||
const boost::archive::library_version_type library_version(
|
||||
ar.get_library_version()
|
||||
|
||||
@@ -30,7 +30,7 @@ template<class Archive, class T>
|
||||
inline void save(
|
||||
Archive & ar,
|
||||
const std::unique_ptr< T > &t,
|
||||
const unsigned int file_version
|
||||
const unsigned int /*file_version*/
|
||||
){
|
||||
// only the raw pointer has to be saved
|
||||
// the ref count is rebuilt automatically on load
|
||||
@@ -42,7 +42,7 @@ template<class Archive, class T>
|
||||
inline void load(
|
||||
Archive & ar,
|
||||
std::unique_ptr< T > &t,
|
||||
const unsigned int file_version
|
||||
const unsigned int /*file_version*/
|
||||
){
|
||||
T *tx;
|
||||
ar >> BOOST_SERIALIZATION_NVP(tx);
|
||||
|
||||
Reference in New Issue
Block a user