mirror of
https://github.com/pybind/pybind11.git
synced 2026-05-26 08:01:48 +00:00
Make it possible to generate constexpr signatures in C++11 mode
The current C++14 constexpr signatures don't require relaxed constexpr, but only `auto` return type deduction. To get around this in C++11, the type caster's `name()` static member functions are turned into `static constexpr auto` variables.
This commit is contained in:
@@ -75,10 +75,8 @@ public:
|
||||
return cpp_function(std::forward<Func>(f_), policy).release();
|
||||
}
|
||||
|
||||
PYBIND11_TYPE_CASTER(type, _("Callable[[") +
|
||||
argument_loader<Args...>::arg_names() + _("], ") +
|
||||
make_caster<retval_type>::name() +
|
||||
_("]"));
|
||||
PYBIND11_TYPE_CASTER(type, _("Callable[[") + argument_loader<Args...>::arg_names + _("], ")
|
||||
+ make_caster<retval_type>::name + _("]"));
|
||||
};
|
||||
|
||||
NAMESPACE_END(detail)
|
||||
|
||||
Reference in New Issue
Block a user