mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
switch this to C++11 code
This commit is contained in:
parent
5bcbe617eb
commit
393db2490b
@ -98,7 +98,8 @@ namespace
|
||||
|
||||
// make sure stateful lambdas are modified when called
|
||||
value = 0;
|
||||
auto stateful = [&value, i = value]() mutable { ++i; value = i; };
|
||||
int i = 0;
|
||||
auto stateful = [&value, i]() mutable { ++i; value = i; };
|
||||
DLIB_TEST(call_if_valid(stateful));
|
||||
DLIB_TEST(value == 1);
|
||||
DLIB_TEST(call_if_valid(stateful));
|
||||
|
Loading…
Reference in New Issue
Block a user