mirror of
https://github.com/boostorg/serialization.git
synced 2026-07-21 13:33:32 +00:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 25ddd06ec8 | |||
| c1b294a279 | |||
| bec3859f66 | |||
| c55ecd8895 | |||
| b47d6622cb | |||
| 796afa5cc8 | |||
| 396ceecace | |||
| cdb14d56d2 | |||
| b2fc052525 |
@@ -33,24 +33,24 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
<li>Mattias Troyer ehnanced the implementation of native binary archives. This includes
|
||||
enhancement and generalization of the library itself including generalization of
|
||||
the wrapper concept.
|
||||
<li>Markus Schöpflin tracked down issues with TRU64 compiler resulting in 100% passing.
|
||||
<li>Markus Schöpflin tracked down issues with TRU64 compiler resulting in 100% passing.
|
||||
<li><a href="mailto::troy@resophonic.com"> Troy D. Straszheim</a> made the initial version of variant serialization.
|
||||
<li>Tonko Juricic helped refine and complete project files for VC 7.1 ide
|
||||
<li><a href="../../../people/rene_rivera.htm">Rene Rivera</a> tracked down several issues related to
|
||||
<li><a href="http://www.boost.org/people/rene_rivera.htm">Rene Rivera</a> tracked down several issues related to
|
||||
Code Warrior, toolset configuration and bjam and much else.
|
||||
<li>Martin Ecker detected (and fixed!) a number of sublte errors regarding cyclic
|
||||
pointers, shared pointers. He also built the library as a DLL and raised some issues
|
||||
<li>Pavel Vozenilek invested much effort in review of code and documentation
|
||||
resulting in many improvements. In addition he help a lot with porting to other
|
||||
platforms including VC 6.0, Intel, and especially Borland.
|
||||
<li><a href="../../../people/jens_maurer.htm">Jens Maurer</a> and
|
||||
<a href="../../../people/beman_dawes.html">Beman Dawes</a> who got the boost
|
||||
<li><a href="http://www.boost.org/people/jens_maurer.htm">Jens Maurer</a> and
|
||||
<a href="http://www.boost.org/people/beman_dawes.html">Beman Dawes</a> who got the boost
|
||||
serialization ball rolling. It was one or both of these two that invented
|
||||
the much beloved <code>&</code> syntax used to implement both save and
|
||||
load in one fuction specification.
|
||||
<li><a href="../../../people/vladimir_prus.htm">Vladimir Prus</a> for evaluating an
|
||||
<li><a href="http://www.boost.org/people/vladimir_prus.htm">Vladimir Prus</a> for evaluating an
|
||||
early draft and contributing the diamond inheritance example.
|
||||
<li><a href="../../../people/william_kempf.htm">William E. Kempf</a>
|
||||
<li><a href="http://www.boost.org/people/william_kempf.htm">William E. Kempf</a>
|
||||
who made the templates for this and other boost manuals. This relieved
|
||||
me of much aggravation.
|
||||
<li><a href="mailto:vahan@unicad.am">Vahan Margaryan</a> and
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ at the front of the list of include paths.
|
||||
<h2><a name="differences_1_32"></a>Differences from Boost 1.32</h2>
|
||||
<ul>
|
||||
<li>Dynamic Linking Library (DLLs and shared libraries) for platforms which support them. See
|
||||
<a href="../../../more/getting_started.html#auto-link">Automatic Linking on Windows</a>.
|
||||
<a href="../../../more/getting_started/windows.html#auto-linking">Automatic Linking on Windows</a>.
|
||||
<li>Implementation of auto-link for compilers which can support this.
|
||||
<li>Better support for <em>Argument Dependent Lookup</em> and two-phase lookup.
|
||||
This results in simpler rules regarding the placing of serialization specializations
|
||||
|
||||
@@ -137,28 +137,6 @@ basic_binary_iprimitive<Archive, Elem, Tr>::load_binary(
|
||||
void *address,
|
||||
std::size_t count
|
||||
){
|
||||
#if 0
|
||||
assert(
|
||||
static_cast<std::size_t>((std::numeric_limits<std::streamsize>::max)()) >= count
|
||||
);
|
||||
//if(is.fail())
|
||||
// boost::throw_exception(archive_exception(archive_exception::stream_error));
|
||||
// note: an optimizer should eliminate the following for char files
|
||||
std::size_t s = count / sizeof(BOOST_DEDUCED_TYPENAME IStream::char_type);
|
||||
is.read(
|
||||
static_cast<BOOST_DEDUCED_TYPENAME IStream::char_type *>(address),
|
||||
s
|
||||
);
|
||||
// note: an optimizer should eliminate the following for char files
|
||||
s = count % sizeof(BOOST_DEDUCED_TYPENAME IStream::char_type);
|
||||
if(0 < s){
|
||||
if(is.fail())
|
||||
boost::throw_exception(archive_exception(archive_exception::stream_error));
|
||||
BOOST_DEDUCED_TYPENAME IStream::char_type t;
|
||||
is.read(& t, 1);
|
||||
std::memcpy(address, &t, s);
|
||||
}
|
||||
#endif
|
||||
// note: an optimizer should eliminate the following for char files
|
||||
std::streamsize s = count / sizeof(Elem);
|
||||
std::streamsize scount = m_sb.sgetn(
|
||||
|
||||
@@ -61,16 +61,6 @@ public:
|
||||
{
|
||||
this->detail_common_iarchive::load_override(t, 0);
|
||||
}
|
||||
#if 0
|
||||
// Borland compilers has a problem with strong type. Try to fix this here
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
|
||||
void load_override(version_type & t, int){
|
||||
unsigned int x;
|
||||
* this->This() >> x;
|
||||
t.t = version_type(x);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
// text file don't include the optional information
|
||||
void load_override(class_id_optional_type & /*t*/, int){}
|
||||
|
||||
|
||||
@@ -95,7 +95,8 @@ basic_binary_iprimitive<Archive, Elem, Tr>::load(std::string & s)
|
||||
#endif
|
||||
s.resize(l);
|
||||
// note breaking a rule here - could be a problem on some platform
|
||||
load_binary(const_cast<char *>(s.data()), l);
|
||||
if(0 < l)
|
||||
load_binary(&(*s.begin()), l);
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_CWCHAR
|
||||
|
||||
@@ -53,7 +53,8 @@ text_iarchive_impl<Archive>::load(std::string &s)
|
||||
if(NULL != s.data())
|
||||
#endif
|
||||
s.resize(size);
|
||||
is.read(const_cast<char *>(s.data()), size);
|
||||
if(0 < size)
|
||||
is.read(&(*s.begin()), size);
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_CWCHAR
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include <boost/serialization/nvp.hpp>
|
||||
#include <boost/serialization/is_bitwise_serializable.hpp>
|
||||
#include <boost/serialization/split_free.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
#include <boost/serialization/nvp.hpp>
|
||||
#include <boost/serialization/is_bitwise_serializable.hpp>
|
||||
#include <boost/mpl/and.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
@@ -49,9 +50,9 @@ struct is_bitwise_serializable<std::pair<T,U> >
|
||||
{
|
||||
};
|
||||
|
||||
template <class T, class U>
|
||||
struct implementation_level<std::pair<T,U> >
|
||||
: mpl::int_<object_serializable> {} ;
|
||||
//template <class T, class U>
|
||||
//struct implementation_level<std::pair<T,U> >
|
||||
// : mpl::int_<object_serializable> {} ;
|
||||
|
||||
} // serialization
|
||||
} // namespace boost
|
||||
|
||||
@@ -30,8 +30,12 @@ int test_main( int /* argc */, char* /* argv */[] )
|
||||
BOOST_REQUIRE(NULL != testfile);
|
||||
|
||||
// test array of objects
|
||||
std::complex<float> a(std::rand(),std::rand());
|
||||
std::complex<double> b(std::rand(),std::rand());
|
||||
std::complex<float> a(static_cast<float>(std::rand()),
|
||||
static_cast<float>(std::rand()));
|
||||
|
||||
std::complex<double> b(static_cast<double>(std::rand()),
|
||||
static_cast<double>(std::rand()));
|
||||
|
||||
{
|
||||
test_ostream os(testfile, TEST_STREAM_FLAGS);
|
||||
test_oarchive oa(os);
|
||||
|
||||
Reference in New Issue
Block a user