Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
bd5f6cbc
Commit
bd5f6cbc
authored
Dec 02, 2021
by
Max Kellermann
Committed by
Max Kellermann
Dec 03, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util/BindMethod: simplify more templates using "auto" template arguments
parent
6fcd1c73
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
BindMethod.hxx
src/util/BindMethod.hxx
+3
-4
No files found.
src/util/BindMethod.hxx
View file @
bd5f6cbc
...
@@ -191,11 +191,11 @@ struct FunctionTraits<R(Args...) noexcept(NoExcept)> {
...
@@ -191,11 +191,11 @@ struct FunctionTraits<R(Args...) noexcept(NoExcept)> {
* @param P the plain function pointer type
* @param P the plain function pointer type
* @param function the function pointer
* @param function the function pointer
*/
*/
template
<
typename
S
,
typename
P
,
P
function
>
template
<
typename
S
,
auto
function
>
struct
BindFunctionWrapperGenerator
;
struct
BindFunctionWrapperGenerator
;
template
<
typename
P
,
P
function
,
bool
NoExcept
,
typename
R
,
typename
...
Args
>
template
<
auto
function
,
bool
NoExcept
,
typename
R
,
typename
...
Args
>
struct
BindFunctionWrapperGenerator
<
R
(
Args
...)
noexcept
(
NoExcept
),
P
,
function
>
{
struct
BindFunctionWrapperGenerator
<
R
(
Args
...)
noexcept
(
NoExcept
),
function
>
{
static
R
Invoke
(
void
*
,
Args
...
args
)
noexcept
(
NoExcept
)
{
static
R
Invoke
(
void
*
,
Args
...
args
)
noexcept
(
NoExcept
)
{
return
function
(
std
::
forward
<
Args
>
(
args
)...);
return
function
(
std
::
forward
<
Args
>
(
args
)...);
}
}
...
@@ -206,7 +206,6 @@ typename MethodWrapperWithSignature<typename T::function_type>::function_pointer
...
@@ -206,7 +206,6 @@ typename MethodWrapperWithSignature<typename T::function_type>::function_pointer
MakeBindFunctionWrapper
()
noexcept
MakeBindFunctionWrapper
()
noexcept
{
{
return
BindFunctionWrapperGenerator
<
typename
T
::
function_type
,
return
BindFunctionWrapperGenerator
<
typename
T
::
function_type
,
typename
T
::
pointer
,
function
>::
Invoke
;
function
>::
Invoke
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment