bolt/deps/llvm-18.1.8/clang/test/SemaCXX/cxx2b-deducing-this-compat.cpp
2025-02-14 19:21:04 +01:00

9 lines
335 B
C++

// RUN: %clang_cc1 -fsyntax-only -std=c++20 %s -verify
struct S {
void f(this auto &a); // expected-error {{explicit object parameters are incompatible with C++ standards before C++2b}}
};
void f() {
(void)[](this auto&a){}; // expected-error {{explicit object parameters are incompatible with C++ standards before C++2b}}
}