[llvm-commits] [llvm] r135391 - /llvm/trunk/include/llvm/ADT/ArrayRef.h

David Blaikie dblaikie at gmail.com
Mon Jul 18 07:52:23 PDT 2011


>
> Actually, the constructor will still be used for implicit conversions
> from arrays
>

Oh, right, sorry to jump the gun.


> The problem seems to be specific to array reference parameter --> ArrayRef
> conversion as in this function.
>

In all other cases it's probably the case that it's used untemplated (the T
is not being deduced from arguments, but explicitly specified in the
function signature) so the compiler's not trying to guess.

I'd probably pick the mapping straight through to the matching ctor, but I'm
sure it doesn't matter either way (just passing one integer through an extra
function call to a really simple inline function anyway). I might play
around with GCC's behavior there at some point to see which compiler(s) are
right, etc.

Thanks for the explanation,
- David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110718/9d42f326/attachment.html>


More information about the llvm-commits mailing list