1 | // RUN: %clang_cc1 -fsyntax-only -std=c++17 %s -verify |
---|---|
2 | // expected-no-diagnostics |
3 | |
4 | void test_noexcept() { |
5 | const auto lambda = [](int x) { return x + 1; }; |
6 | static_assert(noexcept((int (*)(int))(lambda)), |
7 | "Lambda-to-function-pointer conversion is expected to be noexcept"); |
8 | } |
9 |