placeholders.hpp 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. //
  12. // Distributed under the Boost Software License, Version 1.0. (See
  13. // accompanying file LICENSE_1_0.txt or copy at
  14. // http://www.boost.org/LICENSE_1_0.txt)
  15. //
  16. // See http://www.boost.org/libs/bind/bind.html for documentation.
  17. //
  18. #include <boost/bind/arg.hpp>
  19. #include <boost/config.hpp>
  20. namespace
  21. {
  22. #if defined(__BORLANDC__) || defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 400)
  23. static inline boost::arg<1> _1() { return boost::arg<1>(); }
  24. static inline boost::arg<2> _2() { return boost::arg<2>(); }
  25. static inline boost::arg<3> _3() { return boost::arg<3>(); }
  26. static inline boost::arg<4> _4() { return boost::arg<4>(); }
  27. static inline boost::arg<5> _5() { return boost::arg<5>(); }
  28. static inline boost::arg<6> _6() { return boost::arg<6>(); }
  29. static inline boost::arg<7> _7() { return boost::arg<7>(); }
  30. static inline boost::arg<8> _8() { return boost::arg<8>(); }
  31. static inline boost::arg<9> _9() { return boost::arg<9>(); }
  32. #elif defined(BOOST_MSVC) || (defined(__DECCXX_VER) && __DECCXX_VER <= 60590031) || defined(__MWERKS__) || \
  33. defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ == 400)
  34. static boost::arg<1> _1;
  35. static boost::arg<2> _2;
  36. static boost::arg<3> _3;
  37. static boost::arg<4> _4;
  38. static boost::arg<5> _5;
  39. static boost::arg<6> _6;
  40. static boost::arg<7> _7;
  41. static boost::arg<8> _8;
  42. static boost::arg<9> _9;
  43. #else
  44. boost::arg<1> _1;
  45. boost::arg<2> _2;
  46. boost::arg<3> _3;
  47. boost::arg<4> _4;
  48. boost::arg<5> _5;
  49. boost::arg<6> _6;
  50. boost::arg<7> _7;
  51. boost::arg<8> _8;
  52. boost::arg<9> _9;
  53. #endif
  54. } // unnamed namespace
  55. #endif // #ifndef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED