<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 --- - Tests for lexicographical_compare have copy/paste error"
href="http://llvm.org/bugs/show_bug.cgi?id=19840">19840</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Tests for lexicographical_compare have copy/paste error
</td>
</tr>
<tr>
<th>Product</th>
<td>libc++
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</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>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>eric@boostpro.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu, mclow.lists@gmail.com
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>By inspecting lexicographical_compare.pass.cpp, I see:
template <class Iter1, class Iter2>
void
test()
{
int ia[] = {1, 2, 3, 4};
const unsigned sa = sizeof(ia)/sizeof(ia[0]);
int ib[] = {1, 2, 3};
assert(!std::lexicographical_compare(ia, ia+sa, ib, ib+2));
assert(std::lexicographical_compare(ib, ib+2, ia, ia+sa));
assert(!std::lexicographical_compare(ia, ia+sa, ib, ib+3));
assert(std::lexicographical_compare(ib, ib+3, ia, ia+sa));
assert(std::lexicographical_compare(ia, ia+sa, ib+1, ib+3));
assert(!std::lexicographical_compare(ib+1, ib+3, ia, ia+sa));
}
The template parameters Iter1 and Iter2 are unused. This is clearly not what
was intended. The error appears in the other lexicographical_compare tests.</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>