source: NonGTP/Boost/boost/python/detail/dependent.hpp @ 857

Revision 857, 976 bytes checked in by igarcia, 19 years ago (diff)
Line 
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
8namespace 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).
19template <class T, class U>
20struct dependent
21{
22    typedef T type;
23};
24
25}}} // namespace boost::python::detail
26
27#endif // DEPENDENT_DWA200286_HPP
Note: See TracBrowser for help on using the repository browser.