https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115664
--- Comment #9 from Pierre Ossman ---
Thank you! That worked nicely!
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115664
--- Comment #8 from Jonathan Wakely ---
Even if you can't use C++17, it still works like this:
if (not std::is_same::value)
if (dynamic_cast(this) == nullptr)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115664
--- Comment #7 from Jonathan Wakely ---
if constexpr (not is_same_v)
if (dynamic_cast(this) == nullptr)
throw Exception("Bad callback");
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115664
--- Comment #6 from Pierre Ossman ---
Is there a cleaner way to can work around this than duplicating the affected
methods? I tried adding a #pragma, but that breaks older versions of gcc that
don't have -Wnonnull-compare.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115664
--- Comment #5 from Andrew Pinski ---
Basically `dynamic_cast(this)` becomes just this if `T == Object` here and
then we warn because this is compared with nullptr.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115664
Andrew Pinski changed:
What|Removed |Added
Status|WAITING |NEW
--- Comment #4 from Andrew Pinski
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115664
Andrew Pinski changed:
What|Removed |Added
Status|NEW |WAITING
--- Comment #3 from Andrew Pins
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115664
Andrew Pinski changed:
What|Removed |Added
Status|WAITING |NEW
--- Comment #2 from Andrew Pinski
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115664
Marek Polacek changed:
What|Removed |Added
Status|UNCONFIRMED |WAITING
Last reconfirmed|