[llvm] r243996 - Avoid passing nullptr to std::equal.

Duncan P. N. Exon Smith via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 16 17:48:33 PDT 2015

> On 2015-Aug-15, at 00:13, Justin Bogner <mail at justinbogner.com> wrote:
> "Duncan P. N. Exon Smith" <dexonsmith at apple.com> writes:
>>> On 2015-Aug-12, at 12:22, Yaron Keren <yaron.keren at gmail.com> wrote:
>>> 3) Should it replace the other uses of std:;equal in LLVM and clang,
>>> although a nullptr is not possible in some (most?) of the code?
>> I'd say that's up to the MSVC folks (like you).  I wouldn't bother
>> for iterators that aren't nullable, but for the others, it seems
>> like it would be nice to have testcases to motivate the change?
>> Possibly better in follow-up commits.
> If we're adding an llvm::equal, we should probably just forbid
> std::equal with the justification that it's broken on MSVC - having two
> ways to do the same thing that are *usually* equivalent will invariably
> result in people using the wrong one in the case where it matters.

Fair enough.

More information about the llvm-commits mailing list