brintos

brintos / llvm-project-archived public Read only

0
0
Text · 294 B · 2d3c69f Raw
9 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -std=c++17 %s -verify2// expected-no-diagnostics3 4void 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