mirror of
https://github.com/boostorg/python.git
synced 2026-01-24 18:12:43 +00:00
Keyword argument support tweak
[SVN r15544]
This commit is contained in:
@@ -217,8 +217,8 @@ class init : public init_base<init<BOOST_PYTHON_OVERLOAD_ARGS> >
|
||||
}
|
||||
|
||||
template <class Keywords>
|
||||
init(Keywords const& kw)
|
||||
: base(0, kw.range())
|
||||
init(Keywords const& kw, char const* doc_ = 0)
|
||||
: base(doc_, kw.range())
|
||||
{
|
||||
typedef typename detail::error::more_keywords_than_init_arguments<
|
||||
Keywords::size, n_arguments
|
||||
@@ -294,18 +294,6 @@ class init<> : public init_base<init<> >
|
||||
{
|
||||
}
|
||||
|
||||
template <class Keywords>
|
||||
init(char const* doc_, Keywords const& kw)
|
||||
: base(doc_, std::make_pair(kw.base(), kw.base() + Keywords::size))
|
||||
{
|
||||
}
|
||||
|
||||
template <class Keywords>
|
||||
init(Keywords const& kw)
|
||||
: base(0, std::make_pair(kw.base(), kw.base() + Keywords::size))
|
||||
{
|
||||
}
|
||||
|
||||
template <class CallPoliciesT>
|
||||
init_with_call_policies<CallPoliciesT, self_t>
|
||||
operator[](CallPoliciesT const& policies) const
|
||||
|
||||
@@ -54,7 +54,7 @@ BOOST_PYTHON_MODULE_INIT(args_ext)
|
||||
def("f2", f, f_overloads(args("x", "y", "z")));
|
||||
def("f3", f, f_overloads(args("x", "y", "z"), "f3's docstring"));
|
||||
|
||||
class_<Y>("Y", init<int>())
|
||||
class_<Y>("Y", init<int>(args("value"), "Y's docstring"))
|
||||
.def("value", &Y::value)
|
||||
;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user