brintos

brintos / llvm-project-archived public Read only

0
0
Text · 438 B · 909ff47 Raw
18 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify=cxx23 -std=c++23 %s2// RUN: %clang_cc1 -fsyntax-only -verify=cxx20 -std=c++20 %s3// cxx23-no-diagnostics4 5struct __unique {6    static constexpr auto operator()() { return 4; };  // cxx20-warning {{is a C++23 extension}}7 8    using P = int();9    constexpr operator P*() { return operator(); }10};11 12__unique four{};13 14int test_four() {15  // Checks that overload resolution works.16  return four();17}18