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

2024-11-11


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.