CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
72 lines
1.9 KiB
C++
72 lines
1.9 KiB
C++
// RUN: %clang_cc1 -std=c++20 -verify %s
|
|
// RUN: %clang_cc1 -std=c++23 -verify %s
|
|
|
|
namespace PR52905 {
|
|
template <class> concept C = true;
|
|
|
|
struct A {
|
|
int begin();
|
|
int begin() const;
|
|
};
|
|
|
|
template <class T>
|
|
concept Beginable = requires (T t) {
|
|
{ t.begin } -> C;
|
|
// expected-note@-1 {{because 't.begin' would be invalid: reference to non-static member function must be called}}
|
|
};
|
|
|
|
static_assert(Beginable<A>); // expected-error {{static assertion failed}}
|
|
// expected-note@-1 {{does not satisfy 'Beginable'}}
|
|
} // namespace PR52905
|
|
|
|
namespace PR52909a {
|
|
|
|
template<class> constexpr bool B = true;
|
|
template<class T> concept True = B<T>;
|
|
|
|
template <class T>
|
|
int foo(T t) requires requires { // expected-note {{candidate template ignored: constraints not satisfied}}
|
|
{t.begin} -> True; // expected-note {{because 't.begin' would be invalid: reference to non-static member function must be called}}
|
|
}
|
|
{}
|
|
|
|
struct A { int begin(); };
|
|
auto x = foo(A()); // expected-error {{no matching function for call to 'foo'}}
|
|
|
|
} // namespace PR52909a
|
|
|
|
namespace PR52909b {
|
|
|
|
template<class> concept True = true;
|
|
|
|
template<class T> concept C = requires {
|
|
{ T::begin } -> True; // expected-note {{because 'T::begin' would be invalid: reference to overloaded function could not be resolved}}
|
|
};
|
|
|
|
struct A {
|
|
static void begin(int);
|
|
static void begin(double);
|
|
};
|
|
|
|
static_assert(C<A>); // expected-error {{static assertion failed}}
|
|
// expected-note@-1 {{because 'A' does not satisfy 'C'}}
|
|
|
|
} // namespace PR52909b
|
|
|
|
namespace PR53075 {
|
|
template<class> concept True = true;
|
|
|
|
template<class T> concept C = requires {
|
|
{ &T::f } -> True; // expected-note {{because '&T::f' would be invalid: reference to overloaded function could not be resolved}}
|
|
};
|
|
|
|
struct S {
|
|
int *f();
|
|
int *f() const;
|
|
};
|
|
|
|
static_assert(C<S>); // expected-error {{static assertion failed}}
|
|
// expected-note@-1 {{because 'S' does not satisfy 'C'}}
|
|
|
|
} // namespace PR53075
|