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