mirror of
https://github.com/boostorg/serialization.git
synced 2026-07-21 13:33:32 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 91d42e235f | |||
| e954446f2a | |||
| bec06ca0d4 | |||
| ea37174708 | |||
| 29ce16419f | |||
| b56cb9ba74 | |||
| 58e92cc397 |
@@ -85,3 +85,5 @@ lib boost_wserialization
|
||||
<link>shared:<define>BOOST_SERIALIZATION_DYN_LINK=1
|
||||
<conditional>@include-spirit
|
||||
;
|
||||
|
||||
boost-install boost_serialization boost_wserialization ;
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <cstddef>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/archive/detail/auto_link_archive.hpp>
|
||||
|
||||
namespace std{
|
||||
#if defined(__LIBCOMO__)
|
||||
@@ -58,7 +59,7 @@ public:
|
||||
template<>
|
||||
class codecvt_null<wchar_t> : public std::codecvt<wchar_t, char, std::mbstate_t>
|
||||
{
|
||||
virtual std::codecvt_base::result
|
||||
virtual BOOST_ARCHIVE_DECL(std::codecvt_base::result)
|
||||
do_out(
|
||||
std::mbstate_t & state,
|
||||
const wchar_t * first1,
|
||||
@@ -68,7 +69,7 @@ class codecvt_null<wchar_t> : public std::codecvt<wchar_t, char, std::mbstate_t>
|
||||
char * last2,
|
||||
char * & next2
|
||||
) const;
|
||||
virtual std::codecvt_base::result
|
||||
virtual BOOST_ARCHIVE_DECL(std::codecvt_base::result)
|
||||
do_in(
|
||||
std::mbstate_t & state,
|
||||
const char * first1,
|
||||
|
||||
@@ -71,16 +71,15 @@ protected:
|
||||
public:
|
||||
// note: NOT part of the public interface
|
||||
void register_basic_serializer(
|
||||
const BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer & bos
|
||||
const basic_oserializer & bos
|
||||
);
|
||||
void save_object(
|
||||
const void *x,
|
||||
const BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer & bos
|
||||
const basic_oserializer & bos
|
||||
);
|
||||
void save_pointer(
|
||||
const void * t,
|
||||
const BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY())
|
||||
basic_pointer_oserializer * bpos_ptr
|
||||
const basic_pointer_oserializer * bpos_ptr
|
||||
);
|
||||
void save_null_pointer(){
|
||||
vsave(NULL_POINTER_TAG);
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace serialization {
|
||||
namespace archive {
|
||||
namespace detail {
|
||||
|
||||
class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer;
|
||||
class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer;
|
||||
|
||||
template<class Archive>
|
||||
class interface_iarchive
|
||||
@@ -51,9 +51,9 @@ public:
|
||||
}
|
||||
|
||||
template<class T>
|
||||
const BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer *
|
||||
const basic_pointer_iserializer *
|
||||
register_type(T * = NULL){
|
||||
const BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer & bpis =
|
||||
const basic_pointer_iserializer & bpis =
|
||||
pointer_iserializer<Archive, T>::get_instance();
|
||||
this->This()->register_basic_serializer(bpis.get_basic_serializer());
|
||||
return & bpis;
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace serialization {
|
||||
namespace archive {
|
||||
namespace detail {
|
||||
|
||||
class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer;
|
||||
class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer;
|
||||
|
||||
template<class Archive>
|
||||
class interface_oarchive
|
||||
@@ -51,9 +51,9 @@ public:
|
||||
}
|
||||
|
||||
template<class T>
|
||||
const BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer *
|
||||
const basic_pointer_oserializer *
|
||||
register_type(const T * = NULL){
|
||||
const BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer & bpos =
|
||||
const basic_pointer_oserializer & bpos =
|
||||
pointer_oserializer<Archive, T>::get_instance();
|
||||
this->This()->register_basic_serializer(bpos.get_basic_serializer());
|
||||
return & bpos;
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
// Copyright © 2001 Ronald Garcia, Indiana University (garcia@osl.iu.edu)
|
||||
// Andrew Lumsdaine, Indiana University (lums@osl.iu.edu). Permission to copy,
|
||||
// use, modify, sell and distribute this software is granted provided this
|
||||
// copyright notice appears in all copies. This software is provided "as is"
|
||||
// without express or implied warranty, and with no claim as to its suitability
|
||||
// for any purpose.
|
||||
// Andrew Lumsdaine, Indiana University (lums@osl.iu.edu).
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_ARCHIVE_DETAIL_UTF8_CODECVT_FACET_HPP
|
||||
#define BOOST_ARCHIVE_DETAIL_UTF8_CODECVT_FACET_HPP
|
||||
|
||||
@@ -41,7 +41,7 @@ void save( Archive & ar, const STD::valarray<U> &t, const unsigned int file_vers
|
||||
{
|
||||
const collection_size_type count(t.size());
|
||||
ar << BOOST_SERIALIZATION_NVP(count);
|
||||
if (count)
|
||||
if (t.size())
|
||||
ar << make_array(detail::get_data(t), t.size());
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ void load( Archive & ar, STD::valarray<U> &t, const unsigned int file_version )
|
||||
collection_size_type count;
|
||||
ar >> BOOST_SERIALIZATION_NVP(count);
|
||||
t.resize(count);
|
||||
if (count)
|
||||
if (t.size())
|
||||
ar >> make_array(detail::get_data(t), t.size());
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/operators.hpp>
|
||||
|
||||
#if !defined(__BORLANDC__)
|
||||
#if !defined(__BORLANDC__) || __BORLANDC__ >= 0x590
|
||||
#define BOOST_STRONG_TYPEDEF(T, D) \
|
||||
struct D \
|
||||
: boost::totally_ordered1< D \
|
||||
@@ -61,6 +61,6 @@
|
||||
bool operator==(const D & rhs) const { return t == rhs.t; } \
|
||||
bool operator<(const D & rhs) const { return t < rhs.t; } \
|
||||
};
|
||||
#endif // !defined(__BORLANDC)
|
||||
#endif // !defined(__BORLANDC) || __BORLANDC__ >= 0x590
|
||||
|
||||
#endif // BOOST_STRONG_TYPEDEF_HPP
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#define BOOST_ARCHIVE_SOURCE
|
||||
#include <boost/archive/codecvt_null.hpp>
|
||||
|
||||
// codecvt implementation for passing wchar_t objects to char output
|
||||
|
||||
+4
-1
@@ -22,6 +22,7 @@
|
||||
#include <cstddef> // size_t
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||
namespace std{
|
||||
using ::rand;
|
||||
@@ -133,7 +134,9 @@ public:
|
||||
friend std::istream & operator>>(std::istream & is, A & a);
|
||||
};
|
||||
|
||||
BOOST_TEST_DONT_PRINT_LOG_VALUE(A);
|
||||
#ifdef BOOST_TEST_DONT_PRINT_LOG_VALUE
|
||||
BOOST_TEST_DONT_PRINT_LOG_VALUE(A)
|
||||
#endif
|
||||
|
||||
template<class S>
|
||||
void randomize(S &x)
|
||||
|
||||
Reference in New Issue
Block a user