Commit Graph

7 Commits

Author SHA1 Message Date
Shane Grant
e2d07a1670 Added unit tests for complex and bitset
Made all template functions for the various types inline
2013-06-16 11:31:59 -07:00
Shane Grant
50ab9ea53f removing extra non const versions of save 2013-06-14 13:35:32 -07:00
Shane Grant
e9d277025f const_cast for save(), seeking for binary_oarchive
Using const cast to get rid of having two versions of save (changed vector and array so far)

Initial implementation of seeking to allow saving and restoring position within a binary archive
2013-06-14 12:17:21 -07:00
Randolph Voorhies
d1abb9effa Fixing error when serializing arrays with internal
We need to be careful about accepting values as const in our save and
load functions for containers. Consider the following example:

SomeStruct has an internal serialize method. We want to serialize an
array of these things, and so we write a function like:

  void save(BinaryOutputArchive & ar, std::array<SomeStruct, N> const & arr)
  {
    for(SomeStruct const & s : arr) ar & s;
  }

Now we're screwed, because SomeStruct's serialize function looks like
this:

  struct SomeStruct
  {
    template<class Archive>
    void serialize(Archive & ar) // notice there is no const qualifier here!
    { ... whatever ... }
  };

So, the solution is to write a non-const and a const version of save for
containers of non-arithmetic types.
2013-06-13 17:39:27 -07:00
Awesome Robot
80d0d4ab05 adding support for more stl types 2013-06-13 16:55:56 -07:00
Laurent Itti
58abf1d2b9 std::shared_ptr works with pointer tracking 2013-06-13 15:54:08 -07:00
Shane Grant
4d56ae215b Moving things around into folders; starting to add individual files for support for various standard library things.
Pointers will take some careful thought
2013-06-13 11:31:55 -07:00