]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/variant/test/test6.cpp
1 //-----------------------------------------------------------------------------
2 // boost-libs variant/test/test6.cpp header file
3 // See http://www.boost.org for updates, documentation, and revision history.
4 //-----------------------------------------------------------------------------
7 // Eric Friedman, Itay Maman
9 // Distributed under the Boost Software License, Version 1.0. (See
10 // accompanying file LICENSE_1_0.txt or copy at
11 // http://www.boost.org/LICENSE_1_0.txt)
13 #include "boost/test/minimal.hpp"
14 #include "boost/variant.hpp"
29 std::ostream
& operator<<(std::ostream
& out
, const jac
& )
40 variant
<jac
, int, double*, const double*> v1
;
41 variant
<int, char, double*, const double*, char*> v2
;
45 verify(v1
, spec
<int>());
46 verify(v2
, spec
<int>());
48 verify_not(v1
, spec
<jac
>());
49 verify_not(v1
, spec
<double*>());
50 verify_not(v1
, spec
<const double*>());
52 verify_not(v2
, spec
<char>());
53 verify_not(v2
, spec
<double*>());
54 verify_not(v2
, spec
<const double*>());
55 verify_not(v2
, spec
<char*>());
58 variant
<jac
, const double*> v3
;
59 variant
<int, unsigned char, double*> v4
;
62 verify(v3
, spec
<jac
>());
63 verify(v4
, spec
<int>());
64 verify_not(v4
, spec
<unsigned char>());
69 int test_main(int , char* [])