fix doc example typo
[boost.git] / boost / python / args_fwd.hpp
blob39239461b0e2615bfcf7dbefac0577697a24ba40
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
8 # include <boost/python/detail/prefix.hpp>
10 # include <boost/python/handle.hpp>
11 # include <boost/config.hpp>
12 # include <cstddef>
13 # include <utility>
15 namespace boost { namespace python {
17 namespace detail
19 struct keyword
21 keyword(char const* name_=0)
22 : name(name_)
25 char const* name;
26 handle<> default_value;
29 template <std::size_t nkeywords = 0> struct keywords;
31 typedef std::pair<keyword const*, keyword const*> keyword_range;
33 template <>
34 struct keywords<0>
36 BOOST_STATIC_CONSTANT(std::size_t, size = 0);
37 static keyword_range range() { return keyword_range(); }
40 namespace error
42 template <int keywords, int function_args>
43 struct more_keywords_than_function_arguments
45 typedef char too_many_keywords[keywords > function_args ? -1 : 1];
50 }} // namespace boost::python
52 #endif // ARGS_FWD_DWA2002927_HPP