]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/variant/test/issue42.cpp
1 //-----------------------------------------------------------------------------
2 // boost-libs variant/test/issue42.cpp source file
3 // See http://www.boost.org for updates, documentation, and revision history.
4 //-----------------------------------------------------------------------------
6 // Copyright (c) 2018 Antony Polukhin
8 // Distributed under the Boost Software License, Version 1.0. (See
9 // accompanying file LICENSE_1_0.txt or copy at
10 // http://www.boost.org/LICENSE_1_0.txt)
12 // Test case from https://github.com/boostorg/variant/issues/42
14 #include <boost/variant.hpp>
21 #ifdef BOOST_NO_CXX11_SMART_PTR
22 template <class T
> struct shared_ptr_like
{};
23 typedef shared_ptr_like
<boost::recursive_variant_
> ptr_t
;
25 typedef std::shared_ptr
<boost::recursive_variant_
> ptr_t
;
32 typedef boost::make_recursive_variant
<
41 typedef boost::make_recursive_variant
<
42 std::string
, int, double, bool,
44 std::map
<const std::string
, boost::recursive_variant_
>,
45 std::vector
<boost::recursive_variant_
>
52 typedef boost::make_recursive_variant
<
54 func
<boost::recursive_variant_(*)(boost::recursive_variant_
&, const boost::recursive_variant_
&)>,
55 boost::recursive_variant_
&(*)(boost::recursive_variant_
, boost::recursive_variant_
*),
59 node3 x3
= func
<node3(*)(node3
&, const node3
&)>();