https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86195
--- Comment #2 from Paolo Monteverde ---
(In reply to Jonathan Wakely from comment #1)
> This started to fail on trunk with r251438
>
> It seems to have been fixed on the gcc-8-branch though. 8.1.1 is not a
> release, we need to know exactly which version you're using (as requested by
> https://gcc.gnu.org/bugs/ when submitting a new bug report).
I spotted the original error on g++ (GCC) 8.1.1 20180531 running on Arch Linux.
The simplified example above is failing on
https://wandbox.org/permlink/VMBVdHgzkcH2xLlb. The only needed option is
-std=c++14 or above.