<div dir="ltr">I'd suggest taking some inspiration from libc++ that has an implementation of the relevant traits that implements the standards-required SFINAE here.</div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jun 6, 2017 at 12:59 PM Francis Ricci <<a href="mailto:francisjricci@gmail.com">francisjricci@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The primary issue I ran into there was that there are many possible<br>
valid input types, and checking for the full set gets pretty messy<br>
(const iterator vs iterator vs pointer, etc). One possible way that<br>
wasn't too messy was to check whether the type was dereferenceable and<br>
iterable (ie can you run *val and ++val), which works as well but<br>
seems hacky to me.<br>
<br>
This solution seemed like the cleanest one, but I can try to work<br>
something out in terms of checking for all the possible valid<br>
iterator/pointer types.<br>
<br>
On Tue, Jun 6, 2017 at 3:54 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br>
> I feel like this should probably be implemented the same way as the standard<br>
> requires - if the type is not a forward iterator, rather than non-integral.<br>
> (you could imagine/create a test case for a situation where there's a type<br>
> that's implicitly convertible to an integral type (for use as the offset<br>
> point in an append call) & either the value type or convertible to it - but<br>
> not an integral type)<br>
><br>
> & also this should be tested and similar solution probably applied to the<br>
> "assign(iter, iter)" and the (iter, iter) ctor.<br>
><br>
> On Tue, Jun 6, 2017 at 11:37 AM Francis Ricci via Phabricator<br>
> <<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>> wrote:<br>
>><br>
>> fjricci added a subscriber: efriedma.<br>
>> fjricci added a comment.<br>
>><br>
>> Accidentally removed a subscriber, re-adding<br>
>><br>
>><br>
>> <a href="https://reviews.llvm.org/D33919" rel="noreferrer" target="_blank">https://reviews.llvm.org/D33919</a><br>
>><br>
>><br>
>><br>
><br>
</blockquote></div>