[libcxx] r181569 - Fix incorrect type usage; nice catch by Sebastian
Sebastian Redl
sebastian.redl at getdesigned.at
Fri May 10 02:55:12 PDT 2013
On 2013-05-10 02:31, Chandler Carruth wrote:
> On Fri, May 10, 2013 at 2:16 AM, Marshall Clow <mclow at qualcomm.com
> <mailto:mclow at qualcomm.com>> wrote:
>
> Author: marshall
> Date: Thu May 9 19:16:10 2013
> New Revision: 181569
>
> URL: http://llvm.org/viewvc/llvm-project?rev=181569&view=rev
> Log:
> Fix incorrect type usage; nice catch by Sebastian
>
>
> Test case please?
>
Hm, something like this?
template <typename I>
struct counting_iterator {
typedef I value_type;
typedef I distance_type;
// other iterator stuff
};
assert(!std::equal(counting_iterator<char>(0x00),
counting_iterator<char>(0x04),
counting_iterator<int>(0x00), counting_iterator<int>(0x104));
That would assign the second distance to a char, which should wrap
around to make the sequences appear the same.
Sebastian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130510/03b64662/attachment.html>
More information about the cfe-commits
mailing list