[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-bugs
Subject:    [Bug libstdc++/103879] error: accessing value of variant::_Copy_ctor_base through a 'const variant<s
From:       lhlaurini at hotmail dot com via Gcc-bugs <gcc-bugs () gcc ! gnu ! org>
Date:       2021-12-31 23:44:09
Message-ID: bug-103879-4-1eV8OSmNX7 () http ! gcc ! gnu ! org/bugzilla/
[Download RAW message or body]

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103879

Luiz Henrique Laurini <lhlaurini at hotmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lhlaurini at hotmail dot com

--- Comment #3 from Luiz Henrique Laurini <lhlaurini at hotmail dot com> ---
(In reply to Andrew Pinski from comment #2)
> MSVC also rejects it:
> example.cpp
> <source>(14): error C2131: expression did not evaluate to a constant
> <source>(10): note: failure was caused by call of undefined function or one
> not declared 'constexpr'
> <source>(10): note: see usage of 'S::~S'

It does compile with MSVC v19.latest: https://godbolt.org/z/McKjfdP5Y.=
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic