@@ -38,7 +38,7 @@ namespace cwg1512 { // cwg1512: 4
38
38
template <typename A, typename B, typename C> void composite_pointer_type_is_ord () {
39
39
composite_pointer_type_is_base<A, B, C>();
40
40
41
- typedef __typeof (val<A>() < val<B>()) cmp; // #cwg1512-lt
41
+ typedef __typeof (val<A>() < val<B>()) cmp; // #cwg1512-lt
42
42
// since-cxx17-warning@#cwg1512-lt {{ordered comparison of function pointers ('int (*)() noexcept' and 'int (*)()')}}
43
43
// since-cxx17-note@#cwg1512-noexcept-1st {{in instantiation of function template specialization 'cwg1512::composite_pointer_type_is_ord<int (*)() noexcept, int (*)(), int (*)()>' requested here}}
44
44
// since-cxx17-warning@#cwg1512-lt {{ordered comparison of function pointers ('int (*)()' and 'int (*)() noexcept')}}
@@ -332,7 +332,7 @@ namespace cwg1550 { // cwg1550: 3.4
332
332
namespace cwg1558 { // cwg1558: 12
333
333
#if __cplusplus >= 201103L
334
334
template <class T , class ...> using first_of = T;
335
- template <class T > first_of<void , typename T::type> f (int ); // #cwg1558-f
335
+ template <class T > first_of<void , typename T::type> f (int ); // #cwg1558-f
336
336
template <class T > void f (...) = delete; // #cwg1558-f-deleted
337
337
338
338
struct X { typedef void type; };
@@ -639,7 +639,7 @@ namespace cwg1591 { //cwg1591. Deducing array bound and element type from initi
639
639
#if __cplusplus >= 201103L
640
640
template <class T , int N> int h (T const (&)[N]);
641
641
int X = h({1 ,2 ,3 }); // T deduced to int, N deduced to 3
642
-
642
+
643
643
template <class T > int j (T const (&)[3]);
644
644
int Y = j({42 }); // T deduced to int, array bound not considered
645
645
@@ -655,12 +655,12 @@ namespace cwg1591 { //cwg1591. Deducing array bound and element type from initi
655
655
656
656
template <class T , int N> int n (T const (&)[N], T);
657
657
int X1 = n({{1 },{2 },{3 }},Aggr()); // OK, T is Aggr, N is 3
658
-
659
-
658
+
659
+
660
660
namespace check_multi_dim_arrays {
661
661
template <class T , int N, int M, int O> int ***f (const T (&a)[N][M][O]); // #cwg1591-f-3
662
662
template <class T , int N, int M> int **f (const T (&a)[N][M]); // #cwg1591-f-2
663
-
663
+
664
664
template <class T , int N> int *f (const T (&a)[N]); // #cwg1591-f-1
665
665
int ***p3 = f({ { {1 ,2 }, {3 , 4 } }, { {5 ,6 }, {7 , 8 } }, { {9 ,10 }, {11 , 12 } } });
666
666
int ***p33 = f({ { {1 ,2 }, {3 , 4 } }, { {5 ,6 }, {7 , 8 } }, { {9 ,10 }, {11 , 12 , 13 } } });
@@ -675,7 +675,7 @@ namespace cwg1591 { //cwg1591. Deducing array bound and element type from initi
675
675
namespace check_multi_dim_arrays_rref {
676
676
template <class T , int N, int M, int O> int ***g (T (&&a)[N][M][O]); // #cwg1591-g-3
677
677
template <class T , int N, int M> int **g (T (&&a)[N][M]); // #cwg1591-g-2
678
-
678
+
679
679
template <class T , int N> int *g (T (&&a)[N]); // #cwg1591-g-1
680
680
int ***p3 = g({ { {1 ,2 }, {3 , 4 } }, { {5 ,6 }, {7 , 8 } }, { {9 ,10 }, {11 , 12 } } });
681
681
int ***p33 = g({ { {1 ,2 }, {3 , 4 } }, { {5 ,6 }, {7 , 8 } }, { {9 ,10 }, {11 , 12 , 13 } } });
@@ -687,15 +687,15 @@ namespace cwg1591 { //cwg1591. Deducing array bound and element type from initi
687
687
int **p22 = g({ {1 ,2 }, {3 , 4 } });
688
688
int *p1 = g({1 , 2 , 3 });
689
689
}
690
-
690
+
691
691
namespace check_arrays_of_init_list {
692
692
template <class T , int N> float *h (const std::initializer_list<T> (&)[N]);
693
693
template <class T , int N> double *h (const T (&)[N]);
694
694
double *p = h({1 , 2 , 3 });
695
695
float *fp = h({{1 }, {1 , 2 }, {1 , 2 , 3 }});
696
696
}
697
697
namespace core_reflector_28543 {
698
-
698
+
699
699
template <class T , int N> int *i (T (&&)[N]); // #1
700
700
template <class T > char *i (std::initializer_list<T> &&); // #2
701
701
template <class T , int N, int M> int **i (T (&&)[N][M]); // #3 #cwg1591-i-2
@@ -704,13 +704,13 @@ namespace cwg1591 { //cwg1591. Deducing array bound and element type from initi
704
704
template <class T > short *i (T (&&)[2]); // #5
705
705
706
706
template <class T > using Arr = T[];
707
-
707
+
708
708
char *pc = i({1 , 2 , 3 }); // OK prefer #2 via 13.3.3.2 [over.ics.rank]
709
- char *pc2 = i({1 , 2 }); // #2 also
709
+ char *pc2 = i({1 , 2 }); // #2 also
710
710
int *pi = i(Arr<int >{1 , 2 , 3 }); // OK prefer #1
711
711
712
712
void *pv1 = i({ {1 , 2 , 3 }, {4 , 5 , 6 } }); // ambiguous btw 3 & 4
713
- // since-cxx11-error@-1 {{call to 'i' is ambiguous}}
713
+ // since-cxx11-error@-1 {{call to 'i' is ambiguous}}
714
714
// since-cxx11-note@#cwg1591-i-2 {{candidate function [with T = int, N = 2, M = 3]}}
715
715
// since-cxx11-note@#cwg1591-i-1 {{candidate function [with T = int, N = 2]}}
716
716
char **pcc = i({ {1 }, {2 , 3 } }); // OK #4
0 commit comments