bind.hpp 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #ifndef BOOST_BIND_HPP_INCLUDED
  2. #define BOOST_BIND_HPP_INCLUDED
  3. // MS compatible compilers support #pragma once
  4. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  5. # pragma once
  6. #endif
  7. // bind.hpp - binds function objects to arguments
  8. //
  9. // Copyright (c) 2009, 2015 Peter Dimov
  10. //
  11. // Distributed under the Boost Software License, Version 1.0.
  12. // See accompanying file LICENSE_1_0.txt or copy at
  13. // http://www.boost.org/LICENSE_1_0.txt
  14. //
  15. // See http://www.boost.org/libs/bind/bind.html for documentation.
  16. //
  17. // For backward compatibility, this header includes
  18. // <boost/bind/bind.hpp> and then imports the placeholders _1, _2,
  19. // _3, ... into the global namespace. Definitions in the global
  20. // namespace are not a good practice and this use is deprecated.
  21. // Please switch to including <boost/bind/bind.hpp> directly,
  22. // adding the using directive locally where appropriate.
  23. // Alternatively, the existing behavior may be preserved by defining
  24. // the macro BOOST_BIND_GLOBAL_PLACEHOLDERS.
  25. #include <boost/bind/bind.hpp>
  26. #include <boost/config/pragma_message.hpp>
  27. #ifndef BOOST_BIND_NO_PLACEHOLDERS
  28. #if !defined(BOOST_BIND_GLOBAL_PLACEHOLDERS)
  29. BOOST_PRAGMA_MESSAGE(
  30. "The practice of declaring the Bind placeholders (_1, _2, ...) "
  31. "in the global namespace is deprecated. Please use "
  32. "<boost/bind/bind.hpp> + using namespace boost::placeholders, "
  33. "or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior."
  34. )
  35. #endif
  36. #if defined(BOOST_CLANG)
  37. # pragma clang diagnostic push
  38. # if __has_warning("-Wheader-hygiene")
  39. # pragma clang diagnostic ignored "-Wheader-hygiene"
  40. # endif
  41. #endif
  42. using namespace boost::placeholders;
  43. #if defined(BOOST_CLANG)
  44. # pragma clang diagnostic pop
  45. #endif
  46. #endif // #ifndef BOOST_BIND_NO_PLACEHOLDERS
  47. #endif // #ifndef BOOST_BIND_HPP_INCLUDED