Debian Codegraph @

libstdc++-v3/testsuite/23_containers/array/comparison_operators/106212.cc

raw
1 // { dg-options "-D_GLIBCXX_DEBUG" }
2 // { dg-do compile { target c++20 } }
3
4 // Bug libstdc++/106212 - Code becomes non-constexpr with _GLIBCXX_DEBUG
5
6 #include <array>
7
8 struct A
9 {
10 constexpr A(int i) : e{i} {}
11 constexpr bool operator==(const A& a) const = default;
12 std::array<int, 1> e;
13 };
14
15 static_assert(A{1} != A{2}, "");