https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88337
--- Comment #2 from emsr at gcc dot gnu.org ---
It looks like try blocks in constexpr is in. p1002r1. This may be enough to
do some constexpr library bits.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88337
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment #3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88337
--- Comment #1 from emsr at gcc dot gnu.org ---
LOL, this compiles:
// P1330R0 - Changing the active member of a union inside constexpr
union Foo
{
int i;
float f;
};
constexpr int
use()
{
Foo foo{};
foo.i = 3;
foo.f = 1.2f;
return
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88337
Marek Polacek changed:
What|Removed |Added
Status|NEW |ASSIGNED
Assignee|unassigned a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88337
--- Comment #5 from Marek Polacek ---
Looks like we need to teach constexpr how to evaluate a call to __dynamic_cast.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88337
--- Comment #6 from Marek Polacek ---
First steps: this now compiles in c++2a:
struct B {
virtual void baz () {}
};
struct D : B { };
constexpr bool
fn ()
{
bool ok = true;
B b;
B *b1 = &b;
if (D *pd = dynamic_cast(b1))
ok = fals
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88337
--- Comment #7 from Marek Polacek ---
Sidecast now works too:
struct A {
virtual void afn () {}
};
struct B {
virtual void bfn () {}
};
struct D : A, B { };
constexpr bool
fn ()
{
bool ok = true;
D d;
A *a = &d;
if (B *bp = dynami
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88337
Marek Polacek changed:
What|Removed |Added
Keywords||patch
--- Comment #8 from Marek Polacek
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88337
--- Comment #9 from Marek Polacek ---
Not entirely true, this template case should be accepted:
#include
struct B { virtual void f(); };
struct B2 : B { };
template
constexpr bool
fn ()
{
constexpr B2 b2;
static_assert(&typeid(b2) == &typ
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88337
--- Comment #10 from Marek Polacek ---
Author: mpolacek
Date: Fri Nov 22 23:48:25 2019
New Revision: 278635
URL: https://gcc.gnu.org/viewcvs?rev=278635&root=gcc&view=rev
Log:
PR c++/88337 - P1327R1: Allow polymorphic typeid in constexpr.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88337
Marek Polacek changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88337
--- Comment #11 from Marek Polacek ---
Author: mpolacek
Date: Sun Dec 29 16:44:41 2019
New Revision: 279755
URL: https://gcc.gnu.org/viewcvs?rev=279755&root=gcc&view=rev
Log:
PR c++/88337 - Implement P1327R1: Allow dynamic_cast in conste
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88337
Marek Polacek changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution|---
13 matches
Mail list logo