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++/78441] New: [variant] variant_alternative doesn't allow cv qualifiers


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

            Bug ID: 78441
           Summary: [variant] variant_alternative doesn't allow cv
                    qualifiers
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eric at efcs dot ca
  Target Milestone: ---

The below reproducer fails to compile.

// Reproducer
#include <variant>

using V = std::variant<int>;
using T = std::variant_alternative_t<0, const V>;
static_assert(std::is_same_v<T, const int>, "");

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