February 13, 2007 [8.50] bug: no match for function 'operator delete(Type*)' | ||||
---|---|---|---|---|
| ||||
This code does not compile in both 8.50 and 8.49 with exceptions enabled (-Ae). === #include <new> struct A {}; struct B { B() {} // * void* operator new(size_t, A&) {return 0;} void operator delete(void*, A&) {} }; int main() { A a; new (a) B(); } === The error is "no match for function 'operator delete(B*)'". Note, that commenting line marked with * fixes the problem. |
Copyright © 1999-2021 by the D Language Foundation