This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/80737] variant<any> as class member resulting to compile errors


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

Tim Shen <timshen at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |timshen at gcc dot gnu.org

--- Comment #2 from Tim Shen <timshen at gcc dot gnu.org> ---
I reduced the test case a bit, noticing that a seemingly trivial change to
<any> makes it compile. Here it is: https://godbolt.org/g/tQowts

Defining the macro BUG reproduces the compile failure, however the code in BUG
should have the same meaning as the other branch - it merely uses a type alias.

FWIW clang 5.0.0 compiles the pre-processed code with/without -DBUG.

I believe that it's a GCC frontend issue.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]