placeholders.hpp 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #ifndef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED
  2. #define BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED
  3. // MS compatible compilers support #pragma once
  4. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  5. # pragma once
  6. #endif
  7. //
  8. // bind/placeholders.hpp - _N definitions
  9. //
  10. // Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
  11. // Copyright 2015 Peter Dimov
  12. //
  13. // Distributed under the Boost Software License, Version 1.0.
  14. // See accompanying file LICENSE_1_0.txt or copy at
  15. // http://www.boost.org/LICENSE_1_0.txt
  16. //
  17. // See http://www.boost.org/libs/bind/bind.html for documentation.
  18. //
  19. #include <boost/bind/arg.hpp>
  20. #include <boost/config.hpp>
  21. namespace boost
  22. {
  23. namespace placeholders
  24. {
  25. #if defined(BOOST_BORLANDC) || defined(__GNUC__) && (__GNUC__ < 4)
  26. inline boost::arg<1> _1() { return boost::arg<1>(); }
  27. inline boost::arg<2> _2() { return boost::arg<2>(); }
  28. inline boost::arg<3> _3() { return boost::arg<3>(); }
  29. inline boost::arg<4> _4() { return boost::arg<4>(); }
  30. inline boost::arg<5> _5() { return boost::arg<5>(); }
  31. inline boost::arg<6> _6() { return boost::arg<6>(); }
  32. inline boost::arg<7> _7() { return boost::arg<7>(); }
  33. inline boost::arg<8> _8() { return boost::arg<8>(); }
  34. inline boost::arg<9> _9() { return boost::arg<9>(); }
  35. #elif !defined(BOOST_NO_CXX17_INLINE_VARIABLES)
  36. BOOST_INLINE_CONSTEXPR boost::arg<1> _1;
  37. BOOST_INLINE_CONSTEXPR boost::arg<2> _2;
  38. BOOST_INLINE_CONSTEXPR boost::arg<3> _3;
  39. BOOST_INLINE_CONSTEXPR boost::arg<4> _4;
  40. BOOST_INLINE_CONSTEXPR boost::arg<5> _5;
  41. BOOST_INLINE_CONSTEXPR boost::arg<6> _6;
  42. BOOST_INLINE_CONSTEXPR boost::arg<7> _7;
  43. BOOST_INLINE_CONSTEXPR boost::arg<8> _8;
  44. BOOST_INLINE_CONSTEXPR boost::arg<9> _9;
  45. #else
  46. BOOST_STATIC_CONSTEXPR boost::arg<1> _1;
  47. BOOST_STATIC_CONSTEXPR boost::arg<2> _2;
  48. BOOST_STATIC_CONSTEXPR boost::arg<3> _3;
  49. BOOST_STATIC_CONSTEXPR boost::arg<4> _4;
  50. BOOST_STATIC_CONSTEXPR boost::arg<5> _5;
  51. BOOST_STATIC_CONSTEXPR boost::arg<6> _6;
  52. BOOST_STATIC_CONSTEXPR boost::arg<7> _7;
  53. BOOST_STATIC_CONSTEXPR boost::arg<8> _8;
  54. BOOST_STATIC_CONSTEXPR boost::arg<9> _9;
  55. #endif
  56. } // namespace placeholders
  57. } // namespace boost
  58. #endif // #ifndef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED