[LLVMbugs] [Bug 18859] New: cv-qualifications not ignored in enum-base

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Feb 15 23:19:55 PST 2014


            Bug ID: 18859
           Summary: cv-qualifications not ignored in enum-base
           Product: clang
           Version: 3.4
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: filip.roseen at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 12071
  --> http://llvm.org/bugs/attachment.cgi?id=12071&action=edit

#include <type_traits>

int main () {
  enum class E : int const volatile { };

  static_assert (
    std::is_same<int, std::underlying_type<E>::type>::value,
    "[dcl.enum]p2 states 'The type-specifier-seq of an enum-base shall "
    "name an integral type; any cv-qualifications ignored.'"


`clang` triggers the above `static_assert` while gcc (among others) does the
right thing and ignores the cv-qualifiers in the enum-base declaration of `E`.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140216/3d1d5220/attachment.html>

More information about the llvm-bugs mailing list