author | sl@SLION-WIN7.fritz.box |
Fri, 15 Jun 2012 03:10:57 +0200 | |
changeset 0 | bde4ae8d615e |
permissions | -rw-r--r-- |
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 ARGS_FWD_DWA2002927_HPP |
sl@0 | 6 |
# define ARGS_FWD_DWA2002927_HPP |
sl@0 | 7 |
|
sl@0 | 8 |
# include <boost/python/detail/prefix.hpp> |
sl@0 | 9 |
|
sl@0 | 10 |
# include <boost/python/handle.hpp> |
sl@0 | 11 |
# include <boost/config.hpp> |
sl@0 | 12 |
# include <cstddef> |
sl@0 | 13 |
# include <utility> |
sl@0 | 14 |
|
sl@0 | 15 |
namespace boost { namespace python { |
sl@0 | 16 |
|
sl@0 | 17 |
namespace detail |
sl@0 | 18 |
{ |
sl@0 | 19 |
struct keyword |
sl@0 | 20 |
{ |
sl@0 | 21 |
keyword(char const* name_=0) |
sl@0 | 22 |
: name(name_) |
sl@0 | 23 |
{} |
sl@0 | 24 |
|
sl@0 | 25 |
char const* name; |
sl@0 | 26 |
handle<> default_value; |
sl@0 | 27 |
}; |
sl@0 | 28 |
|
sl@0 | 29 |
template <std::size_t nkeywords = 0> struct keywords; |
sl@0 | 30 |
|
sl@0 | 31 |
typedef std::pair<keyword const*, keyword const*> keyword_range; |
sl@0 | 32 |
|
sl@0 | 33 |
template <> |
sl@0 | 34 |
struct keywords<0> |
sl@0 | 35 |
{ |
sl@0 | 36 |
BOOST_STATIC_CONSTANT(std::size_t, size = 0); |
sl@0 | 37 |
static keyword_range range() { return keyword_range(); } |
sl@0 | 38 |
}; |
sl@0 | 39 |
|
sl@0 | 40 |
namespace error |
sl@0 | 41 |
{ |
sl@0 | 42 |
template <int keywords, int function_args> |
sl@0 | 43 |
struct more_keywords_than_function_arguments |
sl@0 | 44 |
{ |
sl@0 | 45 |
typedef char too_many_keywords[keywords > function_args ? -1 : 1]; |
sl@0 | 46 |
}; |
sl@0 | 47 |
} |
sl@0 | 48 |
} |
sl@0 | 49 |
|
sl@0 | 50 |
}} // namespace boost::python |
sl@0 | 51 |
|
sl@0 | 52 |
#endif // ARGS_FWD_DWA2002927_HPP |