Commit Graph

5 Commits

Author SHA1 Message Date
Randolph Voorhies
d060da918c Added list unit tests 2013-06-13 18:45:33 -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