dr127.c

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

C
29
字号
// { dg-do link }// Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org>// DR127: Ambiguity in description of matching deallocation function#include <cstddef>#include <new>struct A {  // placement new, but can be called through normal new syntax.  void* operator new(std::size_t size, float = 0.0f)  {    return ::operator new(size);  }  // The matching deallocation function must be called, which means  //  the placemente delete.  void operator delete(void*);  void operator delete(void*, float) {}  A()  { throw 5; }};int main(){  (void)new A;}

⌨️ 快捷键说明

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