Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
0f06d78e
"...docs/source/git@developer.sourcefind.cn:OpenDAS/dgl.git" did not exist on "7e0893e6978939f2c92f1f070b14f11db19fd45f"
Commit
0f06d78e
authored
Jul 22, 2016
by
Davis King
Browse files
Add guard so code compiles in old compilers.
parent
d635a7ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
dlib/test/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