/* * [begin_description] * Boost bind pull the placeholders, _1, _2, ... into global * namespace. This can conflict with the C++03 TR1 and C++11 * std::placeholders. This header provides a workaround for * this problem. * [end_description] * * Copyright 2012 Christoph Koke * Copyright 2012 Karsten Ahnert * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or * copy at http://www.boost.org/LICENSE_1_0.txt) * */ #ifndef ACTIV_BOOST_NUMERIC_ODEINT_UTIL_BIND_HPP_INCLUDED #define ACTIV_BOOST_NUMERIC_ODEINT_UTIL_BIND_HPP_INCLUDED #include #if ACTIV_BOOST_NUMERIC_ODEINT_CXX11 #include #else #define ACTIV_BOOST_BIND_NO_PLACEHOLDERS #include #endif namespace Boost { namespace numeric { namespace odeint { namespace detail { #if ACTIV_BOOST_NUMERIC_ODEINT_CXX11 using ::std::bind; using namespace ::std::placeholders; #else // unnamed namespace to avoid multiple declarations (#138) namespace { using ::Boost::bind; Boost::arg<1> _1; Boost::arg<2> _2; } // using ::Boost::bind; // using ::_1; // using ::_2; #endif } } } } /* // the following is the suggested way. Unfortunately it does not work with all compilers. #ifdef ACTIV_BOOST_NO_CXX11_HDR_FUNCTIONAL #include #else #include #endif namespace Boost { namespace numeric { namespace odeint { namespace detail { #ifdef ACTIV_BOOST_NO_CXX11_HDR_FUNCTIONAL using ::Boost::bind; using ::_1; using ::_2; #else using ::std::bind; using namespace ::std::placeholders; #endif } } } }*/ #endif // ACTIV_BOOST_NUMERIC_ODEINT_UTIL_BIND_HPP_INCLUDED