brintos

brintos / llvm-project-archived public Read only

0
0
Text · 370 B · 29af5e6 Raw
18 lines · cpp
1// RUN: %clang_cc1 -std=c++20 -include %s %s -o %t2 3// RUN: %clang_cc1 -std=c++20 -emit-pch %s -o %t4// RUN: %clang_cc1 -std=c++20 -include-pch %t -verify %s5 6// expected-no-diagnostics7 8#ifndef HEADER9#define HEADER10 11template<typename T> auto f() -> decltype([]{ return T(42); });12 13#else /*included pch*/14 15static_assert(decltype(f<int>())()() == 42);16 17#endif // HEADER18