<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - vector<T1, allocator<T2>> fails to compile"
href="http://llvm.org/bugs/show_bug.cgi?id=15576">15576</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>vector<T1, allocator<T2>> fails to compile
</td>
</tr>
<tr>
<th>Product</th>
<td>libc++
</td>
</tr>
<tr>
<th>Version</th>
<td>3.2
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>hhinnant@apple.com
</td>
</tr>
<tr>
<th>Reporter</th>
<td>tim@klingt.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>this code fails to compile with a rather obscure error message in v[0]:
```
#include <vector>
using namespace std;
vector<size_t, allocator<int>> v;
int main()
{
v.push_back(0);
v[0];
return 0;
}
```
gcc/libstdc++ accept this code, though. iac, i'd suggest one of two
workarounds:
* rebind the allocator to the type of the vector
* add a static assertion that (Alloc::value_type == vector::value_type). this
should simplify finding this kind of issues where they appear</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>