sl@0
|
1 |
// Copyright David Abrahams 2002.
|
sl@0
|
2 |
// Distributed under the Boost Software License, Version 1.0. (See
|
sl@0
|
3 |
// accompanying file LICENSE_1_0.txt or copy at
|
sl@0
|
4 |
// http://www.boost.org/LICENSE_1_0.txt)
|
sl@0
|
5 |
#ifndef DEPENDENT_DWA200286_HPP
|
sl@0
|
6 |
# define DEPENDENT_DWA200286_HPP
|
sl@0
|
7 |
|
sl@0
|
8 |
namespace boost { namespace python { namespace detail {
|
sl@0
|
9 |
|
sl@0
|
10 |
// A way to turn a concrete type T into a type dependent on U. This
|
sl@0
|
11 |
// keeps conforming compilers (those implementing proper 2-phase
|
sl@0
|
12 |
// name lookup for templates) from complaining about incomplete
|
sl@0
|
13 |
// types in situations where it would otherwise be inconvenient or
|
sl@0
|
14 |
// impossible to re-order code so that all types are defined in time.
|
sl@0
|
15 |
|
sl@0
|
16 |
// One such use is when we must return an incomplete T from a member
|
sl@0
|
17 |
// function template (which must be defined in the class body to
|
sl@0
|
18 |
// keep MSVC happy).
|
sl@0
|
19 |
template <class T, class U>
|
sl@0
|
20 |
struct dependent
|
sl@0
|
21 |
{
|
sl@0
|
22 |
typedef T type;
|
sl@0
|
23 |
};
|
sl@0
|
24 |
|
sl@0
|
25 |
}}} // namespace boost::python::detail
|
sl@0
|
26 |
|
sl@0
|
27 |
#endif // DEPENDENT_DWA200286_HPP
|