enable_if.hpp 927 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright David Abrahams 2004. Distributed under the Boost
  2. // Software License, Version 1.0. (See accompanying
  3. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  4. #ifndef ENABLE_IF_DWA2004722_HPP
  5. # define ENABLE_IF_DWA2004722_HPP
  6. # include <boost/python/detail/sfinae.hpp>
  7. # include <boost/detail/workaround.hpp>
  8. #if !defined(BOOST_NO_SFINAE)
  9. # include <boost/utility/enable_if.hpp>
  10. namespace boost { namespace python { namespace detail {
  11. template <class C, class T = int>
  12. struct enable_if_arg
  13. : enable_if<C,T>
  14. {};
  15. template <class C, class T = int>
  16. struct disable_if_arg
  17. : disable_if<C,T>
  18. {};
  19. template <class C, class T = void>
  20. struct enable_if_ret
  21. : enable_if<C,T>
  22. {};
  23. template <class C, class T = void>
  24. struct disable_if_ret
  25. : disable_if<C,T>
  26. {};
  27. }}} // namespace boost::python::detail
  28. # endif
  29. #endif // ENABLE_IF_DWA2004722_HPP