[LLVMbugs] [Bug 16599] New: get(tuple) and get(pair) are not constexpr, but they should be sometimes.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jul 11 09:44:04 PDT 2013


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

            Bug ID: 16599
           Summary: get(tuple) and get(pair) are not constexpr, but they
                    should be sometimes.
           Product: libc++
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: hhinnant at apple.com
          Reporter: mclow.lists at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

In C++11 (N3290), get(pair) is defined as:

template<size_t I, class T1, class T2>
  typename tuple_element<I, std::pair<T1, T2> >::type&
    get(pair<T1, T2>&) noexcept;

But in the C++14 draft (N3690), it is defined as:

template<size_t I, class T1, class T2>
  constexpr typename tuple_element<I, std::pair<T1, T2> >::type&
    get(pair<T1, T2>&) noexcept;

(same for other get(pair) and get(tuple) variants)

Libc++ should mark these routines as constexpr when building for C++14.

Side note: Are there other routines like this?

-- 
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/20130711/2ab0300c/attachment.html>


More information about the llvm-bugs mailing list