}
}
+namespace dr13 { // dr13: no
+ extern "C" void f(int);
+ void g(char);
+
+ template<typename T> struct A {
+ A(void (*fp)(T));
+ };
+ template<typename T> int h(void (T));
+
+ A<int> a1(f); // FIXME: We should reject this.
+ A<char> a2(g);
+ int a3 = h(f); // FIXME: We should reject this.
+ int a4 = h(g);
+}
+
namespace dr14 { // dr14: yes
namespace X { extern "C" int dr14_f(); }
namespace Y { extern "C" int dr14_f(); }
int k = f(U());
}
+namespace dr92 { // dr92: yes
+ void f() throw(int, float);
+ void (*p)() throw(int) = &f; // expected-error {{target exception specification is not superset of source}}
+ void (*q)() throw(int);
+ void (**pp)() throw() = &q; // expected-error {{exception specifications are not allowed}}
+
+ void g(void() throw());
+ void h() {
+ g(f); // expected-error {{is not superset}}
+ g(q); // expected-error {{is not superset}}
+ }
+
+ template<void() throw()> struct X {};
+ X<&f> xp; // ok
+}
+
// dr93: na
namespace dr94 { // dr94: yes
struct S { int n; } s = { { 1 } }; // expected-warning {{braces around scalar initializer}}
}
+// dr158 FIXME write codegen test
+
namespace dr159 { // dr159: 3.5
namespace X { void f(); }
void f();
}
}
-// dr222 is a mystery -- it lists no changes to the standard, and yet was
-// apparently both voted into the WP and acted upon by the editor.
+namespace dr222 { // dr222: dup 637
+ void f(int a, int b, int c, int *x) {
+#pragma clang diagnostic push
+#pragma clang diagnostic warning "-Wunsequenced"
+ void((a += b) += c);
+ void((a += b) + (a += c)); // expected-warning {{multiple unsequenced modifications to 'a'}}
+
+ x[a++] = a; // expected-warning {{unsequenced modification and access to 'a'}}
+
+ a = b = 0; // ok, read and write of 'b' are sequenced
+
+ a = (b = a++); // expected-warning {{multiple unsequenced modifications to 'a'}}
+ a = (b = ++a);
+#pragma clang diagnostic pop
+ }
+}
// dr223: na
template<> void f<int>() {}
}
+namespace dr230 { // dr230: yes
+ struct S {
+ S() { f(); } // expected-warning {{call to pure virtual member function}}
+ virtual void f() = 0; // expected-note {{declared here}}
+ };
+}
+
namespace dr231 { // dr231: yes
namespace outer {
namespace inner {
#endif
}
+namespace dr314 { // dr314: dup 1710
+ template<typename T> struct A {
+ template<typename U> struct B {};
+ };
+ template<typename T> struct C : public A<T>::template B<T> {
+ C() : A<T>::template B<T>() {}
+ };
+}
+
// dr315: na
// dr316: sup 1004
// dr342: na
+namespace dr343 { // dr343: no
+ // FIXME: dup 1710
+ template<typename T> struct A {
+ template<typename U> struct B {};
+ };
+ // FIXME: In these contexts, the 'template' keyword is optional.
+ template<typename T> struct C : public A<T>::B<T> { // expected-error {{use 'template'}}
+ C() : A<T>::B<T>() {} // expected-error {{use 'template'}}
+ };
+}
+
+namespace dr344 { // dr344: dup 1435
+ struct A { inline virtual ~A(); };
+ struct B { friend A::~A(); };
+}
+
namespace dr345 { // dr345: yes
struct A {
struct X {};
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#13">13</a></td>
<td>NAD</td>
<td>extern "C" for Parameters of Function Templates</td>
- <td class="none" align="center">Unknown</td>
+ <td class="none" align="center">No</td>
</tr>
<tr>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#14">14</a></td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#92">92</a></td>
<td>NAD</td>
<td>Should <I>exception-specification</I>s be part of the type system?</td>
- <td class="none" align="center">Unknown</td>
+ <td class="full" align="center">Yes</td>
</tr>
<tr>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#93">93</a></td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#222">222</a></td>
<td>CD1</td>
<td>Sequence points and lvalue-returning operators</td>
- <td class="none" align="center">Unknown</td>
+ <td class="none" align="center">Duplicate of 637</td>
</tr>
<tr>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#223">223</a></td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#230">230</a></td>
<td>NAD</td>
<td>Calls to pure virtual functions</td>
- <td class="none" align="center">Unknown</td>
+ <td class="full" align="center">Yes</td>
</tr>
<tr>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#231">231</a></td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#314">314</a></td>
<td>ready</td>
<td><TT>template</TT> in base class specifier</td>
- <td class="none" align="center">Unknown</td>
+ <td class="none" align="center">Duplicate of 1710</td>
</tr>
<tr>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_closed.html#315">315</a></td>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#343">343</a></td>
<td>ready</td>
<td>Make <TT>template</TT> optional in contexts that require a type</td>
- <td class="none" align="center">Unknown</td>
+ <td class="none" align="center">No</td>
</tr>
<tr>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#344">344</a></td>
<td>CD3</td>
<td>Naming destructors</td>
- <td class="none" align="center">Unknown</td>
+ <td class="none" align="center">Duplicate of 1435</td>
</tr>
<tr>
<td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#345">345</a></td>