placeholders.hpp 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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(__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. #else
  36. BOOST_STATIC_CONSTEXPR boost::arg<1> _1;
  37. BOOST_STATIC_CONSTEXPR boost::arg<2> _2;
  38. BOOST_STATIC_CONSTEXPR boost::arg<3> _3;
  39. BOOST_STATIC_CONSTEXPR boost::arg<4> _4;
  40. BOOST_STATIC_CONSTEXPR boost::arg<5> _5;
  41. BOOST_STATIC_CONSTEXPR boost::arg<6> _6;
  42. BOOST_STATIC_CONSTEXPR boost::arg<7> _7;
  43. BOOST_STATIC_CONSTEXPR boost::arg<8> _8;
  44. BOOST_STATIC_CONSTEXPR boost::arg<9> _9;
  45. #endif
  46. } // namespace placeholders
  47. } // namespace boost
  48. #endif // #ifndef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED