Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
0f06d78e
Commit
0f06d78e
authored
Jul 23, 2016
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add guard so code compiles in old compilers.
parent
d635a7ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
threads.cpp
dlib/test/threads.cpp
+2
-0
No files found.
dlib/test/threads.cpp
View file @
0f06d78e
...
...
@@ -21,6 +21,7 @@ namespace
void
test_async
()
{
#if __cplusplus >= 201103
print_spinner
();
auto
v1
=
dlib
::
async
([]()
{
dlib
::
sleep
(
500
);
return
1
;
}).
share
();
auto
v2
=
dlib
::
async
([
v1
]()
{
dlib
::
sleep
(
400
);
return
v1
.
get
()
+
1
;
}).
share
();
...
...
@@ -42,6 +43,7 @@ namespace
DLIB_TEST
(
e
.
what
()
==
string
(
"oops"
));
}
DLIB_TEST
(
got_exception
);
#endif
}
class
threads_tester
:
public
tester
...
...
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