[llvm-bugs] [Bug 24725] New: max(initializer_list<T>) not constexpr

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Sep 5 15:38:30 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=24725

            Bug ID: 24725
           Summary: max(initializer_list<T>) not constexpr
           Product: libc++
           Version: 3.6
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: cppljevans at suddenlink.net
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
    Classification: Unclassified

Created attachment 14846
  --> https://llvm.org/bugs/attachment.cgi?id=14846&action=edit
source file

According to n4527, section 25.4.7, downloadable from here:

http://open-std.org/JTC1/SC22/WG21/docs/papers/2015/n4527.pdf

one signature of max is:

template<class T>
constexpr T max(initializer_list<T> t);

However, when the attached is compiled with version 3.6 of clang,
with options:

  -stdlib=libc++  -std=c++14

I get the errors shown in 2nd attachment.

BTW, with clang3.5, it compiled OK.

-- 
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/20150905/d456493a/attachment.html>


More information about the llvm-bugs mailing list