1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
3 Copyright (c) 2001-2011 Hartmut Kaiser
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_SPIRIT_UNUSED_APRIL_16_2006_0616PM)
9 #define BOOST_SPIRIT_UNUSED_APRIL_16_2006_0616PM
15 #include <boost/config.hpp>
16 #include <boost/mpl/bool.hpp>
18 #if defined(BOOST_MSVC)
19 # pragma warning(push)
20 # pragma warning(disable: 4522) // multiple assignment operators specified warning
23 ///////////////////////////////////////////////////////////////////////////////
24 namespace boost { namespace spirit
26 ///////////////////////////////////////////////////////////////////////////
27 // We do not import fusion ::unused_type anymore to avoid boost::fusion
28 // being turned into an associate namespace for boost::spirit, as this
29 // interferes with ADL in unexpected ways. We rather copy the full
30 // unused_type implementation from boost::fusion.
31 ///////////////////////////////////////////////////////////////////////////
45 operator=(T const&) const
58 operator=(unused_type const&) const
64 operator=(unused_type const&)
70 unused_type const unused = unused_type();
76 unused_only(unused_type const&) {}
80 template <typename Out>
81 inline Out& operator<<(Out& out, detail::unused_only const&)
86 template <typename In>
87 inline In& operator>>(In& in, unused_type&)
92 ///////////////////////////////////////////////////////////////////////////
95 // We use this test to detect if the argument is not an unused_type
96 template <typename T> struct not_is_unused : mpl::true_ {};
97 template <> struct not_is_unused<unused_type> : mpl::false_ {};
101 #if defined(BOOST_MSVC)
102 # pragma warning(pop)