|
||||
File indexing completed on 2025-01-18 09:42:58
0001 /* 0002 * [begin_description] 0003 * Boost bind pull the placeholders, _1, _2, ... into global 0004 * namespace. This can conflict with the C++03 TR1 and C++11 0005 * std::placeholders. This header provides a workaround for 0006 * this problem. 0007 * [end_description] 0008 * 0009 * Copyright 2012 Christoph Koke 0010 * Copyright 2012 Karsten Ahnert 0011 * 0012 * Distributed under the Boost Software License, Version 1.0. 0013 * (See accompanying file LICENSE_1_0.txt or 0014 * copy at http://www.boost.org/LICENSE_1_0.txt) 0015 * */ 0016 0017 #ifndef BOOST_NUMERIC_ODEINT_UTIL_BIND_HPP_INCLUDED 0018 #define BOOST_NUMERIC_ODEINT_UTIL_BIND_HPP_INCLUDED 0019 0020 0021 #include <boost/numeric/odeint/config.hpp> 0022 0023 0024 #if BOOST_NUMERIC_ODEINT_CXX11 0025 #include <functional> 0026 #else 0027 #define BOOST_BIND_NO_PLACEHOLDERS 0028 #include <boost/bind.hpp> 0029 #endif 0030 0031 namespace boost { 0032 namespace numeric { 0033 namespace odeint { 0034 namespace detail { 0035 0036 #if BOOST_NUMERIC_ODEINT_CXX11 0037 0038 using ::std::bind; 0039 using namespace ::std::placeholders; 0040 0041 0042 #else 0043 0044 // unnamed namespace to avoid multiple declarations (#138) 0045 namespace { 0046 using ::boost::bind; 0047 boost::arg<1> _1; 0048 boost::arg<2> _2; 0049 } 0050 // using ::boost::bind; 0051 // using ::_1; 0052 // using ::_2; 0053 0054 #endif 0055 0056 } 0057 } 0058 } 0059 } 0060 0061 0062 0063 0064 0065 /* 0066 0067 // the following is the suggested way. Unfortunately it does not work with all compilers. 0068 0069 #ifdef BOOST_NO_CXX11_HDR_FUNCTIONAL 0070 #include <boost/bind.hpp> 0071 #else 0072 #include <functional> 0073 #endif 0074 0075 0076 namespace boost { 0077 namespace numeric { 0078 namespace odeint { 0079 namespace detail { 0080 0081 0082 #ifdef BOOST_NO_CXX11_HDR_FUNCTIONAL 0083 0084 using ::boost::bind; 0085 using ::_1; 0086 using ::_2; 0087 0088 #else 0089 0090 using ::std::bind; 0091 using namespace ::std::placeholders; 0092 0093 #endif 0094 0095 0096 } 0097 } 0098 } 0099 }*/ 0100 0101 #endif // BOOST_NUMERIC_ODEINT_UTIL_BIND_HPP_INCLUDED
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |