]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/python/include/boost/python/args_fwd.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / python / include / boost / python / args_fwd.hpp
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 ARGS_FWD_DWA2002927_HPP
6 # define ARGS_FWD_DWA2002927_HPP
7
8 # include <boost/python/detail/prefix.hpp>
9
10 # include <boost/python/handle.hpp>
11 # include <boost/config.hpp>
12 # include <cstddef>
13 # include <utility>
14
15 namespace boost { namespace python {
16
17 namespace detail
18 {
19 struct keyword
20 {
21 keyword(char const* name_=0)
22 : name(name_)
23 {}
24
25 char const* name;
26 handle<> default_value;
27 };
28
29 template <std::size_t nkeywords = 0> struct keywords;
30
31 typedef std::pair<keyword const*, keyword const*> keyword_range;
32
33 template <>
34 struct keywords<0>
35 {
36 BOOST_STATIC_CONSTANT(std::size_t, size = 0);
37 static keyword_range range() { return keyword_range(); }
38 };
39
40 namespace error
41 {
42 template <int keywords, int function_args>
43 struct more_keywords_than_function_arguments
44 {
45 typedef char too_many_keywords[keywords > function_args ? -1 : 1];
46 };
47 }
48 }
49
50 }} // namespace boost::python
51
52 #endif // ARGS_FWD_DWA2002927_HPP