bind.hpp 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. *
  11. * Distributed under the Boost Software License, Version 1.0.
  12. * (See accompanying file LICENSE_1_0.txt or
  13. * copy at http://www.boost.org/LICENSE_1_0.txt)
  14. * */
  15. #ifndef BOOST_NUMERIC_ODEINT_UTIL_BIND_HPP_INCLUDED
  16. #define BOOST_NUMERIC_ODEINT_UTIL_BIND_HPP_INCLUDED
  17. #include <boost/numeric/odeint/config.hpp>
  18. #if BOOST_NUMERIC_ODEINT_CXX11
  19. #include <type_traits>
  20. #else
  21. #include <boost/bind.hpp>
  22. #endif
  23. namespace boost {
  24. namespace numeric {
  25. namespace odeint {
  26. namespace detail {
  27. #if BOOST_NUMERIC_ODEINT_CXX11
  28. using ::std::bind;
  29. using namespace ::std::placeholders;
  30. #else
  31. using ::boost::bind;
  32. using ::_1;
  33. using ::_2;
  34. #endif
  35. }
  36. }
  37. }
  38. }
  39. #endif // BOOST_NUMERIC_ODEINT_UTIL_BIND_HPP_INCLUDED