1 /*============================================================================= 2 Copyright (c) 2001-2011 Joel de Guzman 3 Copyright (c) 2018 Kohei Takahashi 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 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 21 namespace boost { namespace fusion 22 { 23 struct unused_type 24 { 25 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED 26 BOOST_DEFAULTED_FUNCTION( unused_typeboost::fusion::unused_type27 unused_type() BOOST_FUSION_NOEXCEPT_ON_DEFAULTED, 28 { 29 }) 30 31 template <typename T> 32 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED 33 unused_type(T const&) BOOST_NOEXCEPT 34 { 35 } 36 }; 37 38 BOOST_CONSTEXPR_OR_CONST unused_type unused = unused_type(); 39 40 namespace detail 41 { 42 struct unused_only 43 { 44 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED unused_onlyboost::fusion::detail::unused_only45 unused_only(unused_type const&) BOOST_NOEXCEPT {} 46 }; 47 } 48 49 BOOST_CONSTEXPR operator <<(std::ostream & out,detail::unused_only const &)50 inline std::ostream& operator<<(std::ostream& out, detail::unused_only const&) BOOST_NOEXCEPT 51 { 52 return out; 53 } 54 55 BOOST_CONSTEXPR operator >>(std::istream & in,unused_type &)56 inline std::istream& operator>>(std::istream& in, unused_type&) BOOST_NOEXCEPT 57 { 58 return in; 59 } 60 }} 61 62 #if defined(BOOST_MSVC) 63 # pragma warning(pop) 64 #endif 65 66 #endif 67