[PATCH] Define iterator_traits for ImmutableSet::iterator

Aaron Ballman aaron at aaronballman.com
Wed Feb 13 06:03:46 PST 2013


On Wed, Feb 13, 2013 at 8:24 AM, Aaron Ballman <aaron at aaronballman.com> wrote:
> On Tue, Feb 12, 2013 at 9:20 PM, Ryan Govostes <rgovostes+git at gmail.com> wrote:
>> http://llvm-reviews.chandlerc.com/D401
>>
>> Files:
>>   include/llvm/ADT/ImmutableSet.h
>>
>> Index: include/llvm/ADT/ImmutableSet.h
>> ===================================================================
>> --- include/llvm/ADT/ImmutableSet.h
>> +++ include/llvm/ADT/ImmutableSet.h
>> @@ -1066,6 +1066,12 @@
>>      inline bool operator==(const iterator& RHS) const { return RHS.itr == itr; }
>>      inline bool operator!=(const iterator& RHS) const { return RHS.itr != itr; }
>>      inline value_type *operator->() const { return &(operator*()); }
>> +
>> +    typedef int difference_type;
>
> I think signed might be preferable over int here.

I take that back -- int is preferred over signed.  So patch looks great as-is!

~Aaron



More information about the llvm-commits mailing list