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

            Bug ID: 27375
           Summary: tuple's "TupleLike" constructors behave slightly
                    differently than standard versions
           Product: libc++
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

Libc++ implements the two standard constructors 1) 'tuple(tuple<Up...> const&)'
and 2) 'tuple(tuple<Up...>&&)' as a single generic overload 'tuple(Tuple&&)'.
This can cause a slight differences in overload resolution.

For example the call to 'tuple(tuple<...>{})' will first consider ctor #2.
However if this constructor SFINAE's aware then ctor #1 should be considered.
Since libc++ only provides a single overload it will only consider #2. This
breaks the following code:

std::tuple<int&>(std::tuple<int&&>(42));

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to