self.hpp 889 B

123456789101112131415161718192021222324252627282930313233
  1. // Copyright David Abrahams 2002.
  2. // Distributed under the Boost Software License, Version 1.0. (See
  3. // accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. #ifndef SELF_DWA2002531_HPP
  6. # define SELF_DWA2002531_HPP
  7. # include <boost/python/detail/prefix.hpp>
  8. namespace boost { namespace python {
  9. #define BOOST_PYTHON_SELF_IS_CLASS
  10. // Sink self_t into its own namespace so that we have a safe place to
  11. // put the completely general operator templates which operate on
  12. // it. It is possible to avoid this, but it turns out to be much more
  13. // complicated and finally GCC 2.95.2 chokes on it.
  14. namespace self_ns
  15. {
  16. # ifndef BOOST_PYTHON_SELF_IS_CLASS
  17. enum self_t { self };
  18. # else
  19. struct self_t {};
  20. extern BOOST_PYTHON_DECL self_t self;
  21. # endif
  22. }
  23. using self_ns::self_t;
  24. using self_ns::self;
  25. }} // namespace boost::python
  26. #endif // SELF_DWA2002531_HPP