diff --git a/include/cereal/cereal.hpp b/include/cereal/cereal.hpp index 4b9a9c11e..a77701037 100644 --- a/include/cereal/cereal.hpp +++ b/include/cereal/cereal.hpp @@ -255,6 +255,20 @@ namespace cereal a large project from Boost to cereal. The preferred interface for cereal is using operator(). */ //! @{ + //! Indicates this archive is not intended for loading + /*! This ensures compatibility with boost archive types. If you are transitioning + from boost, you can check this value within a member or external serialize function + (i.e., Archive::is_loading::value) to disable behavior specific to loading, until + you can transition to split save/load or save_minimal/load_minimal functions */ + using is_loading = std::false_type; + + //! Indicates this archive is intended for saving + /*! This ensures compatibility with boost archive types. If you are transitioning + from boost, you can check this value within a member or external serialize function + (i.e., Archive::is_saving::value) to enable behavior specific to loading, until + you can transition to split save/load or save_minimal/load_minimal functions */ + using is_saving = std::true_type; + //! Serializes passed in data /*! This is a boost compatability layer and is not the preferred way of using cereal. If you are transitioning from boost, use this until you can @@ -611,6 +625,20 @@ namespace cereal a large project from Boost to cereal. The preferred interface for cereal is using operator(). */ //! @{ + //! Indicates this archive is intended for loading + /*! This ensures compatibility with boost archive types. If you are transitioning + from boost, you can check this value within a member or external serialize function + (i.e., Archive::is_loading::value) to enable behavior specific to loading, until + you can transition to split save/load or save_minimal/load_minimal functions */ + using is_loading = std::true_type; + + //! Indicates this archive is not intended for saving + /*! This ensures compatibility with boost archive types. If you are transitioning + from boost, you can check this value within a member or external serialize function + (i.e., Archive::is_saving::value) to disable behavior specific to loading, until + you can transition to split save/load or save_minimal/load_minimal functions */ + using is_saving = std::false_type; + //! Serializes passed in data /*! This is a boost compatability layer and is not the preferred way of using cereal. If you are transitioning from boost, use this until you can