Marking adapters as FUTURE_EXPERIMENTAL

see notes in #46
This commit is contained in:
Shane Grant
2015-01-16 15:42:10 -08:00
parent 9fb72cf6c4
commit 418271f219
2 changed files with 8 additions and 0 deletions
+7
View File
@@ -35,6 +35,8 @@
namespace cereal
{
#ifdef CEREAL_FUTURE_EXPERIMENTAL
// Forward declaration for friend access
template <class U, class A> U & get_user_data( A & );
@@ -51,6 +53,8 @@ namespace cereal
with the construct class to allow for non-default
constructors.
@note This feature is experimental and may be altered or removed in a future release. See issue #46.
@code{.cpp}
struct MyUserData
{
@@ -130,6 +134,8 @@ namespace cereal
some archive wrapped by UserDataAdapter. If this is used on
an archive that is not wrapped, a run-time exception will occur.
@note This feature is experimental and may be altered or removed in a future release. See issue #46.
@note The correct use of this function cannot be enforced at compile
time.
@@ -151,6 +157,7 @@ namespace cereal
throw ::cereal::Exception("Attempting to get user data from archive not wrapped in UserDataAdapter");
}
}
#endif // CEREAL_FUTURE_EXPERIMENTAL
} // namespace cereal
#endif // CEREAL_ARCHIVES_ADAPTERS_HPP_
+1
View File
@@ -25,6 +25,7 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "common.hpp"
#define CEREAL_FUTURE_EXPERIMENTAL
#include <cereal/archives/adapters.hpp>
#include <boost/test/unit_test.hpp>