Bare metal without global operator new
问题 Consider safety software, where dynamic allocation in general is disallowed and exceptions are disallowed. Dynamic allocation is allowed only when class explicity defines operator new and delete . Using operator new for others class should cause compilation failure. The simplest way to cause compilation failure in described situation is to remove global new operator: void* operator new(std::size_t) = delete; On the one hand this cause side effects with standard library. For example including