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