Add test for PR c++/92443.

* g++.dg/cpp0x/constexpr-92443.C: New test.

From-SVN: r278534
This commit is contained in:
Marek Polacek 2019-11-20 22:59:20 +00:00 committed by Marek Polacek
parent 0f6e9b2946
commit 3697264c3a
2 changed files with 17 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2019-11-20 Marek Polacek <polacek@redhat.com>
PR c++/92443
* g++.dg/cpp0x/constexpr-92443.C: New test.
2019-11-20 Richard Sandiford <richard.sandiford@arm.com>
PR testsuite/92366

View file

@ -0,0 +1,12 @@
// PR c++/92443
// { dg-do compile { target c++11 } }
struct a {
constexpr a(long) : b() {}
operator long() const;
operator bool();
constexpr friend a operator|(a, a c) { return c; }
long b;
};
using d = a;
constexpr d e = 6, f = f | e;