]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/serialization/test/test_singleton.cpp
1 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
2 // test_singleton.cpp: test implementation of run-time casting of void pointers
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 // <gennadiy.rozental@tfn.com>
10 #include "test_tools.hpp"
11 #include <boost/serialization/singleton.hpp>
17 test1(const x
& x1
, const x
& x2
){
18 BOOST_CHECK(& x1
== & x2
);
22 test_main( int /* argc */, char* /* argv */[] )
24 const x
& x1
= boost::serialization::singleton
<x
>::get_const_instance();
25 const x
& x2
= boost::serialization::singleton
<x
>::get_const_instance();
27 BOOST_CHECK(& x1
== & x2
);
30 boost::serialization::singleton
<x
>::get_const_instance(),
31 boost::serialization::singleton
<x
>::get_const_instance()