On 20.05.2011, at 15:59, Johannes Schaub (litb) wrote:

> Sebastian Redl wrote:
> 
>> Author: cornedbee
>> Date: Fri May 20 16:07:01 2011
>> New Revision: 131754
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=131754&view=rev
>> Log:
>> Introduce XFAILed test for braced initializer lists.
>> 
> Perhaps:
> 
>   template<int N>
> +  struct A {
> +    A() { static_assert(N == 0, ""); }
> +    A(int, double) { static_assert(N == 1, ""); }
> +    A(int, int) { static_assert(N == 2, ""); }
> +    A(std::initializer_list<int>) { static_assert(N == 3, ""); }
> +
> +    int operator[](A);
> +  };
> 
> +  void initialization() {
> +    { A<0> a{}; }
> +    { A<0> a = {}; }
> +    { A<3> a{1, 1.0}; }
> +    { A<3> a = {1, 1.0}; }
> +    { A<3> a{1, 2, 3, 4, 5, 6, 7, 8}; }
> +    { A<3> a = {1, 2, 3, 4, 5, 6, 7, 8}; }
> +    { A<3> a{1, 2, 3, 4, 5, 6, 7, 8}; }
> +    { A<3> a{1, 2}; }
> +  }

Perfect, thanks.

> 
> I did some other tests that I posted to a GCC PR. If you want you can add 
> them here too: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47453#c3

Will do.

Sebastian
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to