blob: c8db1eee42cf39f2cd07120d8394f29b2b6b1a09 [file] [log] [blame]
// { dg-do compile { target c++26 } }
#include <functional>
struct IncompleteClass;
int a1 = alignof(std::function_ref<int(IncompleteClass)>); // { dg-error "here" }
int a2 = alignof(std::function_ref<int(int, IncompleteClass)>); // { dg-error "here" }
enum Enum {
x = [] {
// Enum enumeration is incomplete here
int a3 = alignof(std::function_ref<int(Enum)>); // { dg-error "here" }
return 1;
}()
};
// { dg-error "static assertion failed" "" { target *-*-* } 0 }