http://llvm.org/bugs/show_bug.cgi?id=18859

            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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

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

#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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to