sl@0: // (C) Copyright John Maddock 2005. sl@0: // Use, modification and distribution are subject to the sl@0: // Boost Software License, Version 1.0. (See accompanying file sl@0: // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) sl@0: sl@0: #ifndef BOOST_TR1_FUNCTIONAL_HPP_INCLUDED sl@0: # define BOOST_TR1_FUNCTIONAL_HPP_INCLUDED sl@0: # include sl@0: # include sl@0: sl@0: #if defined(BOOST_HAS_TR1_REFERENCE_WRAPPER) \ sl@0: || defined(BOOST_HAS_TR1_RESULT_OF)\ sl@0: || defined(BOOST_HAS_TR1_MEM_FN)\ sl@0: || defined(BOOST_HAS_TR1_BIND)\ sl@0: || defined(BOOST_HAS_TR1_FUNCTION)\ sl@0: || defined(BOOST_HAS_TR1_HASH) sl@0: # ifdef BOOST_HAS_INCLUDE_NEXT sl@0: # include_next BOOST_TR1_HEADER(functional) sl@0: # else sl@0: # include BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(functional)) sl@0: # endif sl@0: #endif sl@0: sl@0: #ifndef BOOST_HAS_TR1_REFERENCE_WRAPPER sl@0: sl@0: #include sl@0: sl@0: namespace std{ namespace tr1{ sl@0: sl@0: using ::boost::reference_wrapper; sl@0: using ::boost::ref; sl@0: using ::boost::cref; sl@0: sl@0: } } sl@0: sl@0: #endif // BOOST_HAS_TR1_REFERENCE_WRAPPER sl@0: sl@0: #if !defined(BOOST_HAS_TR1_RESULT_OF)\ sl@0: && !defined(BOOST_NO_SFINAE) && \ sl@0: !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) sl@0: sl@0: // sl@0: // we can only actually include result_of.hpp if the compiler sl@0: // really does support it, otherwise we just get endless errors... sl@0: // sl@0: #include sl@0: sl@0: namespace std{ namespace tr1{ sl@0: sl@0: using ::boost::result_of; sl@0: sl@0: } } sl@0: sl@0: #endif // BOOST_HAS_TR1_RESULT_OF sl@0: sl@0: #ifndef BOOST_HAS_TR1_MEM_FN sl@0: // mem_fn: sl@0: #include sl@0: sl@0: namespace std{ namespace tr1{ sl@0: sl@0: using boost::mem_fn; sl@0: sl@0: } } sl@0: sl@0: #endif // BOOST_HAS_TR1_MEM_FN sl@0: sl@0: sl@0: #ifndef BOOST_HAS_TR1_BIND sl@0: // Bind: sl@0: #include sl@0: sl@0: namespace std{ namespace tr1{ sl@0: sl@0: // These aren't supported in this release but are in mainline cvs: sl@0: // using ::boost::is_bind_expression; sl@0: // using ::boost::is_placeholder; sl@0: using ::boost::bind; sl@0: namespace placeholders { sl@0: #ifndef BOOST_BIND_NO_PLACEHOLDERS sl@0: using ::_1; sl@0: using ::_2; sl@0: using ::_3; sl@0: using ::_4; sl@0: using ::_5; sl@0: using ::_6; sl@0: using ::_7; sl@0: using ::_8; sl@0: using ::_9; sl@0: #endif sl@0: } // placeholders sl@0: sl@0: } } sl@0: sl@0: #endif sl@0: sl@0: #ifndef BOOST_HAS_TR1_FUNCTION sl@0: // polymorphic function object wrappers: sl@0: #include sl@0: #include sl@0: sl@0: #if !BOOST_WORKAROUND(__BORLANDC__, < 0x582) \ sl@0: && !BOOST_WORKAROUND(BOOST_MSVC, < 1310) \ sl@0: && !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX) sl@0: namespace std{ namespace tr1{ sl@0: sl@0: using ::boost::bad_function_call; sl@0: using ::boost::function; sl@0: using ::boost::swap; sl@0: sl@0: }} sl@0: #endif sl@0: sl@0: #endif // BOOST_HAS_TR1_FUNCTION sl@0: sl@0: #ifndef BOOST_HAS_TR1_HASH sl@0: // sl@0: // This header can get included by boost/hash.hpp sl@0: // leading to cyclic dependencies. As a workaround sl@0: // we forward declare boost::hash and include sl@0: // the actual header later. sl@0: // sl@0: namespace boost{ sl@0: template struct hash; sl@0: } sl@0: sl@0: namespace std{ namespace tr1{ sl@0: using ::boost::hash; sl@0: sl@0: }} sl@0: sl@0: #include sl@0: sl@0: #endif sl@0: sl@0: #endif sl@0: