[llvm-bugs] [Bug 31384] New: tuple is *still* nonconforming ;)

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Dec 14 18:08:54 PST 2016


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

            Bug ID: 31384
           Summary: tuple is *still* nonconforming ;)
           Product: libc++
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: Casey at Carter.net
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
    Classification: Unclassified

Changes to tuple in r289727 broke range-v3! Specifically, this program no
longer compiles:

template<class T>
struct derived : std::tuple<T> {
  using std::tuple<T>::tuple;
  template<class U>
  operator std::tuple<U>() && {
    return {};
  }
};

int main() {
  std::tuple<int> foo = derived<int&&>{42};
}

derived's conversion operator to std::tuple is an exact match, and should be
preferred by overload resolution to std::tuple's constructor that requires a
conversion-to-base.

-- 
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/20161215/273d1cbf/attachment.html>


More information about the llvm-bugs mailing list