dependent.hpp 949 B

123456789101112131415161718192021222324252627
  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 DEPENDENT_DWA200286_HPP
  6. # define DEPENDENT_DWA200286_HPP
  7. namespace boost { namespace python { namespace detail {
  8. // A way to turn a concrete type T into a type dependent on U. This
  9. // keeps conforming compilers (those implementing proper 2-phase
  10. // name lookup for templates) from complaining about incomplete
  11. // types in situations where it would otherwise be inconvenient or
  12. // impossible to re-order code so that all types are defined in time.
  13. // One such use is when we must return an incomplete T from a member
  14. // function template (which must be defined in the class body to
  15. // keep MSVC happy).
  16. template <class T, class U>
  17. struct dependent
  18. {
  19. typedef T type;
  20. };
  21. }}} // namespace boost::python::detail
  22. #endif // DEPENDENT_DWA200286_HPP