util/BindMethod: move SignatureHelper to return type
This commit is contained in:
parent
7d26cd74c1
commit
5aaa3f50aa
|
@ -126,12 +126,10 @@ MakeWrapperFunction() noexcept
|
||||||
* @param instance the instance of #T to be bound
|
* @param instance the instance of #T to be bound
|
||||||
*/
|
*/
|
||||||
template<auto method>
|
template<auto method>
|
||||||
constexpr auto
|
constexpr BoundMethod<typename BindMethodDetail::SignatureHelper<decltype(method)>::plain_signature>
|
||||||
BindMethod(typename BindMethodDetail::SignatureHelper<decltype(method)>::class_type &instance) noexcept
|
BindMethod(typename BindMethodDetail::SignatureHelper<decltype(method)>::class_type &instance) noexcept
|
||||||
{
|
{
|
||||||
using H = BindMethodDetail::SignatureHelper<decltype(method)>;
|
return {
|
||||||
using plain_signature = typename H::plain_signature;
|
|
||||||
return BoundMethod<plain_signature>{
|
|
||||||
&instance,
|
&instance,
|
||||||
BindMethodDetail::MakeWrapperFunction<method>(),
|
BindMethodDetail::MakeWrapperFunction<method>(),
|
||||||
};
|
};
|
||||||
|
@ -156,12 +154,10 @@ BindMethod(typename BindMethodDetail::SignatureHelper<decltype(method)>::class_t
|
||||||
* @param function the function pointer
|
* @param function the function pointer
|
||||||
*/
|
*/
|
||||||
template<auto function>
|
template<auto function>
|
||||||
constexpr auto
|
constexpr BoundMethod<typename BindMethodDetail::SignatureHelper<decltype(function)>::plain_signature>
|
||||||
BindFunction() noexcept
|
BindFunction() noexcept
|
||||||
{
|
{
|
||||||
using H = BindMethodDetail::SignatureHelper<decltype(function)>;
|
return {
|
||||||
using plain_signature = typename H::plain_signature;
|
|
||||||
return BoundMethod<plain_signature>{
|
|
||||||
nullptr,
|
nullptr,
|
||||||
BindMethodDetail::MakeWrapperFunction<function>(),
|
BindMethodDetail::MakeWrapperFunction<function>(),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue