comparison gcc/testsuite/g++.dg/cpp0x/constexpr-86953.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 // PR c++/86953
2 // { dg-do run { target c++11 } }
3 // { dg-options "-O2" }
4
5 struct B {
6 double x;
7 bool y, z;
8 constexpr bool operator== (const B& o) const noexcept
9 {
10 return x == o.x && y == o.y && z == o.z;
11 }
12 constexpr bool operator!= (const B& o) const noexcept { return !(*this == o); }
13 };
14
15 int
16 main ()
17 {
18 bool b = B{} == B{};
19 }