brintos

brintos / llvm-project-archived public Read only

0
0
Text · 272 B · 15111f7 Raw
11 lines · cpp
1// RUN: %clang_cc1 -std=c++20 -verify %s2// expected-no-diagnostics3 4namespace SpaceshipImpliesEq {5  template<typename T> struct A {6    int operator<=>(const A&) const = default;7    constexpr bool f() { return operator==(*this); }8  };9  static_assert(A<int>().f());10}11