This is a solution for #46 that uses RTTI to allow get_user_data to work
and throw an error when used in an archive that doesn't actually have user
data. Unfortunately this is a run-time check and uses a dummy virtual function
that is never actually called (so the overhead of this will be very low, a few bytes
for the vtable, no runtime cost).
Another solution I'm going to play around with involves re-arranging some templates and
typedefs.
In sandbox_vs.cpp, there is a very strange issue with calling
traits::is_input_serializable that causes icc 15.0.0 to crash.
Everything else works great though.
Added a set of trait classes that can be used to get an input archive
from an output archive. Requires specializing a struct for each direction or
alternatively using the new macro CEREAL_SETUP_ARCHIVE_TRAITS(InArchive, OutArchive).
This has already been added for all built in archive types. This is currently only
used for minimal serialization.
load_minimal type traits now correctly use the output archive to check the existence of
a corresponding save_minimal and get its return type, using the new get_input_from_output
type class.
Added a test for this case into the minimal structs test.
Sandbox_vs needed the new macro to become compliant.
If someone attempts to have both a versioned and non-versioned serialization
function, they will get a compile time error.
relates to improvements in #23
Also fixed a bug with some type traits that would erroneously return true if
an odd number of boolean variables were true when the desired behavior was to return
false if more than one boolean variable was true.
Need to revise the no matching serialization to properly fire if a type is specialized
but has both versioned and non-versioned functions of the specialization type.