This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 114a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-04-18


1948. exception-specification of replacement global new

Section: 6.7.5.5  [basic.stc.dynamic]     Status: NAD     Submitter: Steve Clamage     Date: 2014-06-18

Some implementations accept code like

  #include <cstddef> // to get size_t
  void* operator new(std::size_t) noexcept { ... }

This declaration conflicts with the predeclaration of operator new with no exception-specification.

See also issue 967.

Rationale (November, 2014):

The specification intentionally makes such replacement functions ill-formed.