diff --git a/clang/test/CXX/drs/dr13xx.cpp b/clang/test/CXX/drs/dr13xx.cpp --- a/clang/test/CXX/drs/dr13xx.cpp +++ b/clang/test/CXX/drs/dr13xx.cpp @@ -35,6 +35,8 @@ #endif // __cplusplus >= 201103L } // namespace dr1307 +// dr1308: sup 1330 + namespace dr1310 { // dr1310: 5 struct S {} * sp = new S::S; // expected-error {{qualified reference to 'S' is a constructor name}} void f() { diff --git a/clang/test/CXX/drs/dr16xx.cpp b/clang/test/CXX/drs/dr16xx.cpp --- a/clang/test/CXX/drs/dr16xx.cpp +++ b/clang/test/CXX/drs/dr16xx.cpp @@ -42,6 +42,28 @@ C c; } +namespace dr1626 { // dr1626: no open +// FIXME: all of the examples are well-formed +#if __cplusplus >= 201103L +namespace ex1 { +template struct C { + template static constexpr bool _S_chk() { return false; } + static const bool __value = _S_chk(); +}; +template struct C; +} // namespace ex1 + +namespace ex2 { +struct C { + static constexpr bool _S_chk() { return false; } + static const bool __value = _S_chk(); + // expected-error@-1 {{in-class initializer for static data member is not a constant expression}} +}; +C c; +} // namespace ex2 +#endif +} // namespace dr1626 + namespace dr1631 { // dr1631: 3.7 #if __cplusplus >= 201103L // Incorrect overload resolution for single-element initializer-list diff --git a/clang/test/CXX/drs/dr18xx.cpp b/clang/test/CXX/drs/dr18xx.cpp --- a/clang/test/CXX/drs/dr18xx.cpp +++ b/clang/test/CXX/drs/dr18xx.cpp @@ -136,6 +136,34 @@ static_assert(!__is_standard_layout(D), ""); } +namespace dr1890 { // dr1890: no drafting +// FIXME: all the examples are well-formed. +namespace ex1 { +#if __cplusplus >= 201402L +struct A { + struct B { + auto foo() { return 0; } + }; + decltype(B().foo()) x; + // expected-error@-1 {{function 'foo' with deduced return type cannot be used before it is defined}} + // expected-note@-4 {{'foo' declared here}} +}; +#endif +} // namespace ex1 + +namespace ex2 { +#if __cplusplus >= 201103L +struct Bar { + struct Baz { + int a = 0; + }; + static_assert(__is_constructible(Baz), ""); + // expected-error@-1 {{static assertion failed}} +}; +#endif +} // namespace ex2 +} // namespace dr1890 + void dr1891() { // dr1891: 4 #if __cplusplus >= 201103L int n; diff --git a/clang/test/CXX/drs/dr23xx.cpp b/clang/test/CXX/drs/dr23xx.cpp --- a/clang/test/CXX/drs/dr23xx.cpp +++ b/clang/test/CXX/drs/dr23xx.cpp @@ -39,6 +39,43 @@ // dr2331: na +namespace dr2335 { // dr2335: no drafting +// FIXME: all of the examples are well-formed. +#if __cplusplus >= 201402L +namespace ex1 { +template struct partition_indices { + static auto compute_right() {} + static constexpr auto right = compute_right; +}; +template struct partition_indices; +} // namespace ex1 + +namespace ex2 { +template struct X {}; +template struct partition_indices { + static auto compute_right() { return X(); } + static constexpr auto right = compute_right; + static constexpr int I = sizeof(T); + // expected-error@-3 {{no member 'I' in 'dr2335::ex2::partition_indices'; it has not yet been instantiated}} + // expected-note@-3 {{in instantiation of member function 'dr2335::ex2::partition_indices::compute_right' requested here}} + // expected-note@+3 {{in instantiation of template class 'dr2335::ex2::partition_indices' requested here}} + // expected-note@-4 {{not-yet-instantiated member is declared here}} +}; +template struct partition_indices; +} // namespace ex2 + +namespace ex3 { +struct partition_indices { + static auto compute_right() {} + static constexpr auto right = compute_right; + // expected-error@-1 {{function 'compute_right' with deduced return type cannot be used before it is defined}} + // expected-note@-3 {{'compute_right' declared here}} + // expected-error@-3 {{declaration of variable 'right' with deduced type 'const auto' requires an initializer}} +}; +} // namespace ex3 +#endif +} // namespace dr2335 + #if __cplusplus >= 201103L namespace dr2338 { // dr2338: 12 namespace B { diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html --- a/clang/www/cxx_dr_status.html +++ b/clang/www/cxx_dr_status.html @@ -2661,7 +2661,7 @@ 437 CD1 Is type of class allowed in member function exception specification? - Superseded by 1308 + Superseded by 1308 438 @@ -7655,7 +7655,7 @@ 1308 CD3 Completeness of class type within an exception-specification - Unknown + Superseded by 1330 1309 @@ -9563,7 +9563,7 @@ 1626 open constexpr member functions in brace-or-equal-initializers - Not resolved + No 1627 @@ -11147,7 +11147,7 @@ 1890 drafting Member type depending on definition of member function - Not resolved + No 1891 @@ -13817,7 +13817,7 @@ 2335 drafting Deduced return types vs member types - Not resolved + No 2336