1 // RUN: %clang_cc1 -fsyntax-only -verify=cxx23 -std=c++23 %s
2 // RUN: %clang_cc1 -fsyntax-only -verify=cxx20 -std=c++20 %s
3 // cxx23-no-diagnostics
4
5 struct __unique {
operator ()__unique6 static constexpr auto operator()() { return 4; }; // cxx20-warning {{is a C++23 extension}}
7
8 using P = int();
operator P*__unique9 constexpr operator P*() { return operator(); }
10 };
11
12 __unique four{};
13
test_four()14 int test_four() {
15 // Checks that overload resolution works.
16 return four();
17 }
18