annotate DEPENDENCIES/generic/include/boost/numeric/odeint/util/bind.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents c530137014c0
children
rev   line source
Chris@16 1 /*
Chris@16 2 * [begin_description]
Chris@16 3 * Boost bind pull the placeholders, _1, _2, ... into global
Chris@16 4 * namespace. This can conflict with the C++03 TR1 and C++11
Chris@16 5 * std::placeholders. This header provides a workaround for
Chris@16 6 * this problem.
Chris@16 7 * [end_description]
Chris@16 8 *
Chris@16 9 * Copyright 2012 Christoph Koke
Chris@101 10 * Copyright 2012 Karsten Ahnert
Chris@16 11 *
Chris@16 12 * Distributed under the Boost Software License, Version 1.0.
Chris@16 13 * (See accompanying file LICENSE_1_0.txt or
Chris@16 14 * copy at http://www.boost.org/LICENSE_1_0.txt)
Chris@16 15 * */
Chris@16 16
Chris@16 17 #ifndef BOOST_NUMERIC_ODEINT_UTIL_BIND_HPP_INCLUDED
Chris@16 18 #define BOOST_NUMERIC_ODEINT_UTIL_BIND_HPP_INCLUDED
Chris@16 19
Chris@16 20
Chris@16 21 #include <boost/numeric/odeint/config.hpp>
Chris@16 22
Chris@16 23
Chris@16 24 #if BOOST_NUMERIC_ODEINT_CXX11
Chris@101 25 #include <functional>
Chris@16 26 #else
Chris@101 27 #define BOOST_BIND_NO_PLACEHOLDERS
Chris@16 28 #include <boost/bind.hpp>
Chris@16 29 #endif
Chris@16 30
Chris@16 31 namespace boost {
Chris@16 32 namespace numeric {
Chris@16 33 namespace odeint {
Chris@16 34 namespace detail {
Chris@16 35
Chris@16 36 #if BOOST_NUMERIC_ODEINT_CXX11
Chris@16 37
Chris@16 38 using ::std::bind;
Chris@16 39 using namespace ::std::placeholders;
Chris@16 40
Chris@16 41
Chris@16 42 #else
Chris@16 43
Chris@101 44 // unnamed namespace to avoid multiple declarations (#138)
Chris@101 45 namespace {
Chris@101 46 using ::boost::bind;
Chris@101 47 boost::arg<1> _1;
Chris@101 48 boost::arg<2> _2;
Chris@101 49 }
Chris@101 50 // using ::boost::bind;
Chris@101 51 // using ::_1;
Chris@101 52 // using ::_2;
Chris@101 53
Chris@101 54 #endif
Chris@101 55
Chris@101 56 }
Chris@101 57 }
Chris@101 58 }
Chris@101 59 }
Chris@101 60
Chris@101 61
Chris@101 62
Chris@101 63
Chris@101 64
Chris@101 65 /*
Chris@101 66
Chris@101 67 // the following is the suggested way. Unfortunately it does not work with all compilers.
Chris@101 68
Chris@101 69 #ifdef BOOST_NO_CXX11_HDR_FUNCTIONAL
Chris@101 70 #include <boost/bind.hpp>
Chris@101 71 #else
Chris@101 72 #include <functional>
Chris@101 73 #endif
Chris@101 74
Chris@101 75
Chris@101 76 namespace boost {
Chris@101 77 namespace numeric {
Chris@101 78 namespace odeint {
Chris@101 79 namespace detail {
Chris@101 80
Chris@101 81
Chris@101 82 #ifdef BOOST_NO_CXX11_HDR_FUNCTIONAL
Chris@101 83
Chris@16 84 using ::boost::bind;
Chris@16 85 using ::_1;
Chris@16 86 using ::_2;
Chris@16 87
Chris@101 88 #else
Chris@101 89
Chris@101 90 using ::std::bind;
Chris@101 91 using namespace ::std::placeholders;
Chris@101 92
Chris@16 93 #endif
Chris@16 94
Chris@101 95
Chris@16 96 }
Chris@16 97 }
Chris@16 98 }
Chris@101 99 }*/
Chris@16 100
Chris@16 101 #endif // BOOST_NUMERIC_ODEINT_UTIL_BIND_HPP_INCLUDED