http://llvm.org/bugs/show_bug.cgi?id=6723

Douglas Gregor <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #2 from Douglas Gregor <[email protected]> 2010-03-27 21:50:54 CDT 
---
(In reply to comment #1)
> I've got a typo there:
> 
> > The behavior of EDG is that in f, it compiles everything, so it gives "C" 
> > the
> value 512, but the type unsigned int.
> 
> Should say
> 
> > The behavior of EDG is that in f, it compiles everything, so it gives "C" 
> > the
> value 512, but the type unsigned char.
> 
> I figured it could cause confusion so i corrected :)

EDG seems to be behaving strangely here, as did Clang. IMO, these should be
deduction failures, since we should convert the deduced template argument to an
unsigned char (value of 0) and then produce a deduction failure when we try to
form the zero-length array.

Clang had two problems, both fixed in r99734: first, we weren't actually
checking the deduced template arguments against the template parameter, so we
weren't converting non-type template arguments appropriately. Second, we only
had a little extension warning (shown only with -pedantic) when forming a
zero-length array, not the hard error it needs to be for SFINAE to work.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to