FS#62966 - [gcc-libs] std::variant breaks with non-trivial inheritance

Attached to Project: Arch Linux
Opened by Phillip Stephens (antidotecrk) - Friday, 21 June 2019, 22:56 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Saturday, 22 June 2019, 21:19 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Bartłomiej Piotrowski (Barthalion)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

If std::variant is inherited in a non-trivial manner it hits bug introduced in 9.1 where `__get` isn't properly tagged `noexcept`, there is a fix upstream available that can be applied to address this issue. Unfortunately since our particular use is non-trivial I can't really give a minimal example to demonstrate the error, it seems to be triggered by `get_if`, but every minimal example I've tried to make has compiled fine.

The error in question is this:
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../include/c++/9.1.0/variant:1559:55: error: '__get' is missing exception specification 'noexcept'
friend constexpr decltype(auto) __detail::__variant::__get(_Vp&& __v)

And the upstream fix is here:
https://gcc.gnu.org/git/?p=gcc.git;a=blobdiff;f=libstdc%2B%2B-v3/include/std/variant;h=d539df125bfff997bc942a6f616e13b59b465c7e;hp=8c7d7f37fe28cdc9175442d9ca6a2a14b146be26;hb=5c6334a5487c032de7f7663d73f521756dc43be2;hpb=3e5c91bda9616fe7ee70b424744e74f4440d1d03
This task depends upon

Closed by  Bartłomiej Piotrowski (Barthalion)
Saturday, 22 June 2019, 21:19 GMT
Reason for closing:  Fixed
Additional comments about closing:  gcc 9.1.0-2

Loading...