Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/serialization/test/test_traits_fail.cpp @ 33

Last change on this file since 33 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

File size: 1.3 KB
Line 
1/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
2// test_traits_fail.cpp: test implementation level trait
3
4// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
5// Use, modification and distribution is subject to the Boost Software
6// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt)
8
9// compile test for traits
10#include "test_tools.hpp"
11#include <boost/preprocessor/stringize.hpp>
12#include BOOST_PP_STRINGIZE(BOOST_ARCHIVE_TEST)
13#include <boost/serialization/level.hpp>
14#include <boost/serialization/version.hpp>
15
16class A
17{
18};
19
20BOOST_CLASS_IMPLEMENTATION(A, boost::serialization::not_serializable)
21// It can make no sense to assign a version number to a class that
22// is not serialized with class information
23BOOST_CLASS_VERSION(A, 2) // should fail during compile
24// It can make no sense to assign tracking behavior to a class that
25// is not serializable. Should fail during compile.
26BOOST_CLASS_TRACKING(A, boost::serialization::track_never) 
27
28class B
29{
30};
31
32BOOST_CLASS_IMPLEMENTATION(B, boost::serialization::object_class_info)
33BOOST_CLASS_VERSION(B, 2)
34BOOST_CLASS_TRACKING(B, boost::serialization::track_always)
35
36int
37test_main( int /* argc */, char* /* argv */[] )
38{
39    return boost::exit_failure;
40}
41
42// EOF
Note: See TracBrowser for help on using the repository browser.