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
0122dc84
Commit
0122dc84
authored
Apr 20, 2021
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util/BindMethod: drop support for GCC older than 7
parent
95ad1b0c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
69 deletions
+13
-69
BindMethod.hxx
src/util/BindMethod.hxx
+13
-69
No files found.
src/util/BindMethod.hxx
View file @
0122dc84
...
@@ -30,8 +30,6 @@
...
@@ -30,8 +30,6 @@
#ifndef BIND_METHOD_HXX
#ifndef BIND_METHOD_HXX
#define BIND_METHOD_HXX
#define BIND_METHOD_HXX
#include "Compiler.h"
#include <type_traits>
#include <type_traits>
#include <utility>
#include <utility>
...
@@ -45,21 +43,11 @@
...
@@ -45,21 +43,11 @@
template
<
typename
S
=
void
()
>
template
<
typename
S
=
void
()
>
class
BoundMethod
;
class
BoundMethod
;
#if GCC_OLDER_THAN(7,0)
static
constexpr
bool
NoExcept
=
false
;
#endif
template
<
typename
R
,
template
<
typename
R
,
#if !GCC_OLDER_THAN(7,0)
bool
NoExcept
,
bool
NoExcept
,
#endif
typename
...
Args
>
typename
...
Args
>
class
BoundMethod
<
R
(
Args
...)
noexcept
(
NoExcept
)
>
{
class
BoundMethod
<
R
(
Args
...)
noexcept
(
NoExcept
)
>
{
typedef
R
(
*
function_pointer
)(
void
*
instance
,
Args
...
args
)
typedef
R
(
*
function_pointer
)(
void
*
instance
,
Args
...
args
)
noexcept
(
NoExcept
);
#if !GCC_OLDER_THAN(7,0)
noexcept
(
NoExcept
)
#endif
;
void
*
instance_
;
void
*
instance_
;
function_pointer
function
;
function_pointer
function
;
...
@@ -106,20 +94,10 @@ template<typename T, typename S>
...
@@ -106,20 +94,10 @@ template<typename T, typename S>
struct
MethodWithSignature
;
struct
MethodWithSignature
;
template
<
typename
T
,
template
<
typename
T
,
#if !GCC_OLDER_THAN(7,0)
bool
NoExcept
,
bool
NoExcept
,
#endif
typename
R
,
typename
...
Args
>
typename
R
,
typename
...
Args
>
struct
MethodWithSignature
<
T
,
R
(
Args
...)
struct
MethodWithSignature
<
T
,
R
(
Args
...)
noexcept
(
NoExcept
)
>
{
#if !GCC_OLDER_THAN(7,0)
typedef
R
(
T
::*
method_pointer
)(
Args
...)
noexcept
(
NoExcept
);
noexcept
(
NoExcept
)
#endif
>
{
typedef
R
(
T
::*
method_pointer
)(
Args
...)
#if !GCC_OLDER_THAN(7,0)
noexcept
(
NoExcept
)
#endif
;
};
};
/**
/**
...
@@ -130,11 +108,7 @@ struct MethodWithSignature<T, R(Args...)
...
@@ -130,11 +108,7 @@ struct MethodWithSignature<T, R(Args...)
template
<
typename
M
>
template
<
typename
M
>
struct
MethodSignatureHelper
;
struct
MethodSignatureHelper
;
template
<
typename
R
,
template
<
typename
R
,
bool
NoExcept
,
typename
T
,
typename
...
Args
>
#if !GCC_OLDER_THAN(7,0)
bool
NoExcept
,
#endif
typename
T
,
typename
...
Args
>
struct
MethodSignatureHelper
<
R
(
T
::*
)(
Args
...)
noexcept
(
NoExcept
)
>
{
struct
MethodSignatureHelper
<
R
(
T
::*
)(
Args
...)
noexcept
(
NoExcept
)
>
{
/**
/**
* The class which contains the given method (signature).
* The class which contains the given method (signature).
...
@@ -145,11 +119,7 @@ struct MethodSignatureHelper<R (T::*)(Args...) noexcept(NoExcept)> {
...
@@ -145,11 +119,7 @@ struct MethodSignatureHelper<R (T::*)(Args...) noexcept(NoExcept)> {
* A function type which describes the "plain" function
* A function type which describes the "plain" function
* signature.
* signature.
*/
*/
typedef
R
plain_signature
(
Args
...)
typedef
R
plain_signature
(
Args
...)
noexcept
(
NoExcept
);
#if !GCC_OLDER_THAN(7,0)
noexcept
(
NoExcept
)
#endif
;
};
};
/**
/**
...
@@ -159,17 +129,10 @@ struct MethodSignatureHelper<R (T::*)(Args...) noexcept(NoExcept)> {
...
@@ -159,17 +129,10 @@ struct MethodSignatureHelper<R (T::*)(Args...) noexcept(NoExcept)> {
template
<
typename
S
>
template
<
typename
S
>
struct
MethodWrapperWithSignature
;
struct
MethodWrapperWithSignature
;
template
<
typename
R
,
template
<
typename
R
,
bool
NoExcept
,
typename
...
Args
>
#if !GCC_OLDER_THAN(7,0)
bool
NoExcept
,
#endif
typename
...
Args
>
struct
MethodWrapperWithSignature
<
R
(
Args
...)
noexcept
(
NoExcept
)
>
{
struct
MethodWrapperWithSignature
<
R
(
Args
...)
noexcept
(
NoExcept
)
>
{
typedef
R
(
*
function_pointer
)(
void
*
instance
,
Args
...)
typedef
R
(
*
function_pointer
)(
void
*
instance
,
#if !GCC_OLDER_THAN(7,0)
Args
...)
noexcept
(
NoExcept
);
noexcept
(
NoExcept
)
#endif
;
};
};
/**
/**
...
@@ -201,10 +164,7 @@ struct BindMethodWrapperGenerator2 {
...
@@ -201,10 +164,7 @@ struct BindMethodWrapperGenerator2 {
template
<
typename
T
,
typename
M
,
M
method
,
typename
S
>
template
<
typename
T
,
typename
M
,
M
method
,
typename
S
>
struct
BindMethodWrapperGenerator
;
struct
BindMethodWrapperGenerator
;
template
<
typename
T
,
template
<
typename
T
,
bool
NoExcept
,
#if !GCC_OLDER_THAN(7,0)
bool
NoExcept
,
#endif
typename
M
,
M
method
,
typename
R
,
typename
...
Args
>
typename
M
,
M
method
,
typename
R
,
typename
...
Args
>
struct
BindMethodWrapperGenerator
<
T
,
M
,
method
,
R
(
Args
...)
noexcept
(
NoExcept
)
>
struct
BindMethodWrapperGenerator
<
T
,
M
,
method
,
R
(
Args
...)
noexcept
(
NoExcept
)
>
:
BindMethodWrapperGenerator2
<
T
,
NoExcept
,
M
,
method
,
R
,
Args
...
>
{
:
BindMethodWrapperGenerator2
<
T
,
NoExcept
,
M
,
method
,
R
,
Args
...
>
{
...
@@ -226,31 +186,19 @@ MakeBindMethodWrapper() noexcept
...
@@ -226,31 +186,19 @@ MakeBindMethodWrapper() noexcept
template
<
typename
S
>
template
<
typename
S
>
struct
FunctionTraits
;
struct
FunctionTraits
;
template
<
typename
R
,
template
<
typename
R
,
bool
NoExcept
,
typename
...
Args
>
#if !GCC_OLDER_THAN(7,0)
bool
NoExcept
,
#endif
typename
...
Args
>
struct
FunctionTraits
<
R
(
Args
...)
noexcept
(
NoExcept
)
>
{
struct
FunctionTraits
<
R
(
Args
...)
noexcept
(
NoExcept
)
>
{
/**
/**
* A function type which describes the "plain" function
* A function type which describes the "plain" function
* signature.
* signature.
*/
*/
typedef
R
function_type
(
Args
...)
typedef
R
function_type
(
Args
...)
noexcept
(
NoExcept
);
#if !GCC_OLDER_THAN(7,0)
noexcept
(
NoExcept
)
#endif
;
/**
/**
* A function pointer type which describes the "plain"
* A function pointer type which describes the "plain"
* function signature.
* function signature.
*/
*/
typedef
R
(
*
pointer
)(
Args
...)
typedef
R
(
*
pointer
)(
Args
...)
noexcept
(
NoExcept
);
#if !GCC_OLDER_THAN(7,0)
noexcept
(
NoExcept
)
#endif
;
};
};
/**
/**
...
@@ -280,11 +228,7 @@ struct BindFunctionWrapperGenerator2 {
...
@@ -280,11 +228,7 @@ struct BindFunctionWrapperGenerator2 {
template
<
typename
S
,
typename
P
,
P
function
>
template
<
typename
S
,
typename
P
,
P
function
>
struct
BindFunctionWrapperGenerator
;
struct
BindFunctionWrapperGenerator
;
template
<
typename
P
,
P
function
,
template
<
typename
P
,
P
function
,
bool
NoExcept
,
typename
R
,
typename
...
Args
>
#if !GCC_OLDER_THAN(7,0)
bool
NoExcept
,
#endif
typename
R
,
typename
...
Args
>
struct
BindFunctionWrapperGenerator
<
R
(
Args
...)
noexcept
(
NoExcept
),
P
,
function
>
struct
BindFunctionWrapperGenerator
<
R
(
Args
...)
noexcept
(
NoExcept
),
P
,
function
>
:
BindFunctionWrapperGenerator2
<
NoExcept
,
P
,
function
,
R
,
Args
...
>
{
:
BindFunctionWrapperGenerator2
<
NoExcept
,
P
,
function
,
R
,
Args
...
>
{
};
};
...
...
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