[LLVMbugs] [Bug 11826] New: inserting into a map<pair<int, int>, int> doesn't parse in microsoft mode with msvc2010's c++ library
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Jan 21 21:08:26 PST 2012
http://llvm.org/bugs/show_bug.cgi?id=11826
Bug #: 11826
Summary: inserting into a map<pair<int, int>, int> doesn't
parse in microsoft mode with msvc2010's c++ library
Product: clang
Version: unspecified
Platform: PC
OS/Version: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: nicolasweber at gmx.de
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
#include <map>
using namespace std;
void f() {
map<pair<int, int>, int> m;
pair<int, int> p(3, 4);
m[p] = 5;
}
C:\src\chrome\src>c:\src\llvm-build\bin\Release\clang.exe -fsyntax-only foo.cc
In file included from foo.cc:1:
In file included from C:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\map:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\xtree:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\xfunctional:7:
In file included from C:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\xstring:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\xmemory:8:
In file included from C:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\include\xutility:8:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility:149:5:
error: call to deleted constructor of
'const std::pair<int, int>'
: first(_Val1), second(_STD move(_Val2))
^ ~~~~~
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility:231:5:
note: in instantiation of member function
'std::_Pair_base<const std::pair<int, int>, int>::_Pair_base' requested
here
: _Mybase(_Val1,
^
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\map:215:5: note:
in instantiation of member function
'std::pair<const std::pair<int, int>, int>::pair' requested here
value_type(_Keyval, mapped_type()));
^
foo.cc:7:4: note: in instantiation of member function 'std::map<std::pair<int,
int>, int, std::less<std::pair<int, int>
>, std::allocator<std::pair<const std::pair<int, int>, int> >
>::operator[]' requested here
m[p] = 5;
^
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility:172:9:
note: function has been explicitly marked
deleted here
struct pair
^
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility:143:5:
error: call to deleted constructor of
'const std::pair<int, int>'
: first(_STD move(_Val1)),
^ ~~~~~~~~~~~~~~~~
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility:253:5:
note: in instantiation of member function
'std::_Pair_base<const std::pair<int, int>, int>::_Pair_base' requested
here
: _Mybase(_STD forward<_Other1>(_Right.first),
^
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xmemory:202:30:
note: in instantiation of function
template specialization 'std::pair<const std::pair<int, int>,
int>::pair<const std::pair<int, int>, int>'
requested here
::new ((void _FARQ *)_Ptr) _Ty(_STD forward<_Ty>(_Val));
^
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xmemory:280:9:
note: in instantiation of member function
'std::allocator<std::pair<const std::pair<int, int>, int> >::construct'
requested here
_Alval.construct(_Pdest, _STD forward<_Ty2>(_Src));
^
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xtree:591:3:
note: in instantiation of function template
specialization 'std::_Cons_val<std::allocator<std::pair<const
std::pair<int, int>, int> >, std::pair<const
std::pair<int, int>, int>, std::pair<const std::pair<int, int>, int> >'
requested here
_Cons_val(this->_Alval, _STD
addressof(this->_Myval(_Wherenode)),
^
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xtree:767:10:
note: in instantiation of function template
specialization 'std::_Tree_val<std::_Tmap_traits<std::pair<int, int>,
int, std::less<std::pair<int, int> >,
std::allocator<std::pair<const std::pair<int, int>, int> >, false>
>::_Buynode<std::pair<const std::pair<int,
int>, int> >' requested here
this->_Buynode(_STD forward<_Valty>(_Val))));
^
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\map:214:19:
note: in instantiation of function template
specialization 'std::_Tree<std::_Tmap_traits<std::pair<int, int>, int,
std::less<std::pair<int, int> >,
std::allocator<std::pair<const std::pair<int, int>, int> >, false>
>::insert<std::pair<const std::pair<int, int>,
int> >' requested here
_Where = this->insert(_Where,
^
foo.cc:7:4: note: in instantiation of member function 'std::map<std::pair<int,
int>, int, std::less<std::pair<int, int>
>, std::allocator<std::pair<const std::pair<int, int>, int> >
>::operator[]' requested here
m[p] = 5;
^
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\utility:172:9:
note: function has been explicitly marked
deleted here
struct pair
^
2 errors generated.
--
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