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
dc127f39
Commit
dc127f39
authored
May 22, 2023
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util/ScopeExit: use std::declval()
Fixes GCC 10 error: error: cannot call member function `Foo` without object
parent
7a99a700
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
ScopeExit.hxx
src/util/ScopeExit.hxx
+1
-1
No files found.
src/util/ScopeExit.hxx
View file @
dc127f39
...
@@ -50,7 +50,7 @@ public:
...
@@ -50,7 +50,7 @@ public:
"noexcept" declaration allows the destructor to throw if
"noexcept" declaration allows the destructor to throw if
the function can throw; without this, a throwing function
the function can throw; without this, a throwing function
would std::terminate() */
would std::terminate() */
~
ScopeExitGuard
()
noexcept
(
noexcept
(
F
::
operator
()()))
{
~
ScopeExitGuard
()
noexcept
(
noexcept
(
std
::
declval
<
F
>
()()))
{
if
(
enabled
)
if
(
enabled
)
F
::
operator
()();
F
::
operator
()();
}
}
...
...
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