]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/fusion/support/unused.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / fusion / support / unused.hpp
CommitLineData
7c673cae
FG
1/*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
92f5a8d4 3 Copyright (c) 2018 Kohei Takahashi
7c673cae
FG
4
5 Distributed under the Boost Software License, Version 1.0. (See accompanying
6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7==============================================================================*/
8#if !defined(BOOST_FUSION_SUPPORT_UNUSED_20070305_1038)
9#define BOOST_FUSION_SUPPORT_UNUSED_20070305_1038
10
11#include <boost/fusion/support/config.hpp>
12#include <iosfwd>
13
7c673cae
FG
14#if defined(BOOST_MSVC)
15# pragma warning(push)
16# pragma warning(disable: 4522) // multiple assignment operators specified warning
17#endif
18
19#define BOOST_FUSION_UNUSED_HAS_IO
20
21namespace boost { namespace fusion
22{
23 struct unused_type
24 {
25 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
92f5a8d4
TL
26 BOOST_DEFAULTED_FUNCTION(
27 unused_type() BOOST_FUSION_NOEXCEPT_ON_DEFAULTED,
7c673cae 28 {
92f5a8d4 29 })
7c673cae 30
7c673cae 31 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
92f5a8d4
TL
32 BOOST_DEFAULTED_FUNCTION(
33 unused_type(unused_type const&) BOOST_FUSION_NOEXCEPT_ON_DEFAULTED,
7c673cae 34 {
92f5a8d4 35 })
7c673cae
FG
36
37 template <typename T>
92f5a8d4
TL
38 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
39 unused_type(T const&) BOOST_NOEXCEPT
7c673cae 40 {
7c673cae
FG
41 }
42
43 BOOST_FUSION_CONSTEXPR_THIS BOOST_FUSION_GPU_ENABLED
44 unused_type const&
45 operator=(unused_type const&) const BOOST_NOEXCEPT
46 {
47 return *this;
48 }
7c673cae
FG
49 };
50
51 BOOST_CONSTEXPR_OR_CONST unused_type unused = unused_type();
52
53 namespace detail
54 {
55 struct unused_only
56 {
57 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
58 unused_only(unused_type const&) BOOST_NOEXCEPT {}
59 };
60 }
61
62 BOOST_CONSTEXPR
63 inline std::ostream& operator<<(std::ostream& out, detail::unused_only const&) BOOST_NOEXCEPT
64 {
65 return out;
66 }
67
68 BOOST_CONSTEXPR
69 inline std::istream& operator>>(std::istream& in, unused_type&) BOOST_NOEXCEPT
70 {
71 return in;
72 }
73}}
74
75#if defined(BOOST_MSVC)
76# pragma warning(pop)
77#endif
78
79#endif