[LLVMbugs] [Bug 13736] New: pair/tuple implicitly performs explicit construction/assignment
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Aug 31 05:15:40 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13736
Bug #: 13736
Summary: pair/tuple implicitly performs explicit
construction/assignment
Product: libc++
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
AssignedTo: hhinnant at apple.com
ReportedBy: ehomyakov at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
This code compiles successfully:
#include <vector>
#include <utility>
using namespace std;
int main() {
//1
pair<int,vector<int>> bug1( pair<int,int>(5,6) );
//2
pair<int,vector<int>> bug2 = pair<int,int>(5,6);
}
It must not, according to:
20.3.2/9
template<class U, class V> pair(U&& x, V&& y) noexcept;
If U is not implicitly convertible to first_type or V is not implicitly
convertible to second type this constructor shall not participate in overload
resolution.
20.3.2/23
template<class U, class V> pair& operator=(const pair<U, V>& p);
Requires: is_assignable<first_type&, const U&>::value is true and
is_assignable<second_type&, const V&>::value is true.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list