Skip to content

Commit 1cec514

Browse files
committed
Martin Wille pointed out some missing header dependencies; fixed.
Also moved boost/python/detail/is_xxx.hpp functionality into boost/detail/is_xxx.hpp to decouple library dependencies between python and parameter. [SVN r31290]
1 parent 8ecd49c commit 1cec514

1 file changed

Lines changed: 4 additions & 53 deletions

File tree

Lines changed: 4 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,13 @@
1-
// Copyright David Abrahams 2003.
1+
// Copyright David Abrahams 2005.
22
// Distributed under the Boost Software License, Version 1.0. (See
33
// accompanying file LICENSE_1_0.txt or copy at
44
// http://www.boost.org/LICENSE_1_0.txt)
55
#ifndef IS_XXX_DWA2003224_HPP
66
# define IS_XXX_DWA2003224_HPP
77

8-
# include <boost/config.hpp>
9-
# include <boost/mpl/bool.hpp>
10-
# include <boost/preprocessor/enum_params.hpp>
8+
# include <boost/detail/is_xxx.hpp>
119

12-
# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
13-
# include <boost/type_traits/is_reference.hpp>
14-
# include <boost/type_traits/add_reference.hpp>
15-
16-
# define BOOST_PYTHON_IS_XXX_DEF(name, qualified_name, nargs) \
17-
template <class X_> \
18-
struct is_##name \
19-
{ \
20-
typedef char yes; \
21-
typedef char (&no)[2]; \
22-
\
23-
static typename add_reference<X_>::type dummy; \
24-
\
25-
struct helpers \
26-
{ \
27-
template < BOOST_PP_ENUM_PARAMS_Z(1, nargs, class U) > \
28-
static yes test( \
29-
qualified_name< BOOST_PP_ENUM_PARAMS_Z(1, nargs, U) >&, int \
30-
); \
31-
\
32-
template <class U> \
33-
static no test(U&, ...); \
34-
}; \
35-
\
36-
BOOST_STATIC_CONSTANT( \
37-
bool, value \
38-
= !is_reference<X_>::value \
39-
& (sizeof(helpers::test(dummy, 0)) == sizeof(yes))); \
40-
\
41-
typedef mpl::bool_<value> type; \
42-
};
43-
44-
# else
45-
46-
# define BOOST_PYTHON_IS_XXX_DEF(name, qualified_name, nargs) \
47-
template <class T> \
48-
struct is_##name : mpl::false_ \
49-
{ \
50-
}; \
51-
\
52-
template < BOOST_PP_ENUM_PARAMS_Z(1, nargs, class T) > \
53-
struct is_##name< \
54-
qualified_name< BOOST_PP_ENUM_PARAMS_Z(1, nargs, T) > \
55-
> \
56-
: mpl::true_ \
57-
{ \
58-
};
59-
60-
# endif
10+
# define BOOST_PYTHON_IS_XXX_DEF(name, qualified_name, nargs) \
11+
BOOST_DETAIL_IS_XXX_DEF(name, qualified_name, nargs)
6112

6213
#endif // IS_XXX_DWA2003224_HPP

0 commit comments

Comments
 (0)