]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
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 VOID_RETURN_DWA200274_HPP | |
6 | # define VOID_RETURN_DWA200274_HPP | |
7 | ||
8 | # include <boost/config.hpp> | |
9 | ||
10 | namespace boost { namespace python { namespace detail { | |
11 | ||
12 | struct void_return | |
13 | { | |
14 | void_return() {} | |
15 | private: | |
16 | void operator=(void_return const&); | |
17 | }; | |
18 | ||
19 | template <class T> | |
20 | struct returnable | |
21 | { | |
22 | typedef T type; | |
23 | }; | |
24 | ||
25 | # ifdef BOOST_NO_VOID_RETURNS | |
26 | template <> | |
27 | struct returnable<void> | |
28 | { | |
29 | typedef void_return type; | |
30 | }; | |
31 | ||
32 | # ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS | |
33 | template <> struct returnable<const void> : returnable<void> {}; | |
34 | template <> struct returnable<volatile void> : returnable<void> {}; | |
35 | template <> struct returnable<const volatile void> : returnable<void> {}; | |
36 | # endif | |
37 | ||
38 | # endif // BOOST_NO_VOID_RETURNS | |
39 | ||
40 | }}} // namespace boost::python::detail | |
41 | ||
42 | #endif // VOID_RETURN_DWA200274_HPP |