pseudodtor3.c

来自「用于进行gcc测试」· C语言 代码 · 共 44 行

C
44
字号
// PR c++/32241// { dg-do compile }struct A{  typedef int T;  T &foo ();  A () { foo.~T (); }	// { dg-error "does not have class type|expected" }};template <typename T> struct B{  T &foo ();  B () { foo.~T (); }	// { dg-error "invalid use of member" }};B<int> b;template <typename T, typename S> struct C{  T t;  C () { t.~S (); }	// { dg-error "is not of type" }};C<int, long int> c;template <typename T> struct D{  T t;  typedef long int U;  D () { t.~U (); }	// { dg-error "is not of type" }};D<int> d;template <typename T> struct E{  T &foo ();  typedef long int U;  E () { foo.~U (); }	// { dg-error "is not of type" }};E<int> e;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?