| 542 | } |
| 543 | |
| 544 | void test() |
| 545 | { |
| 546 | const auto f1 = [](float a, int b, long c) { return a + b + c;}; |
| 547 | const auto f2 = [](int a, float b, double c) { return a + b + c;}; |
| 548 | const auto f3 = [] {}; |
| 549 | int i{0}; |
| 550 | const auto f4 = wrap(f1, i); |
| 551 | DLIB_TEST(i == 1); |
| 552 | const auto f5 = wrap(f2, i); |
| 553 | DLIB_TEST(i == 2); |
| 554 | const auto f6 = wrap(f3, i); |
| 555 | DLIB_TEST(i == 3); |
| 556 | } |
| 557 | |
| 558 | static_assert(!is_callable<int>::value, "bad"); |
| 559 | } |
no test coverage detected