// tuple_ignore.hpp ----------------------------------------------------- // Copyright (C) 1999, 2000 Jaakko Järvi (jaakko.jarvi@cs.utu.fi) // // Permission to copy, use, sell and distribute this software is granted // provided this copyright notice appears in all copies. // Permission to modify the code and to distribute modified code is granted // provided this copyright notice appears in all copies, and a notice // that the code was modified is included with the copyright notice. // // This software is provided "as is" without express or implied warranty, // and with no claim as to its suitability for any purpose. // For more information, see http://www.boost.org // ----------------------------------------------------------------- #ifndef BOOST_TUPLE_IGNORE_HPP #define BOOST_TUPLE_IGNORE_HPP namespace boost { namespace tuples { // Swallows any assignment (by Doug Gregor) namespace detail { struct swallow_assign { template swallow_assign& operator=(const T&) { return *this; } }; } // namespace detail // "ignore" allows tuple positions to be ignored when using "tie". #ifdef BOOST_TUPLE_EXTERN # ifndef BOOST_TUPLE_EXTERN_DEFINITION # define BOOST_TUPLE_LINKAGE extern # else # define BOOST_TUPLE_LINKAGE # endif # define BOOST_TUPLE_DECLSPEC BOOST_DECL #else # define BOOST_TUPLE_LINKAGE # define BOOST_TUPLE_DECLSPEC #endif #ifndef BOOST_TUPLE_EXTERN namespace { #endif BOOST_TUPLE_LINKAGE detail::swallow_assign BOOST_TUPLE_DECLSPEC ignore; #ifndef BOOST_TUPLE_EXTERN } // unnamed namespace #endif } // end of namespace tuples } // end of namespace boost #undef BOOST_TUPLE_LINKAGE #undef BOOST_TUPLE_DECLSPEC #endif // BOOST_TUPLE_IGNORE_HPP