http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50594

Daniel Krügler <daniel.kruegler at googlemail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |daniel.kruegler at
                   |                            |googlemail dot com

--- Comment #5 from Daniel Krügler <daniel.kruegler at googlemail dot com> 
2011-10-03 13:17:11 UTC ---
I would have expected that the shown program works as expected. I'm quoting
ISO/IEC 14882:2003(E) (but N3290 seems to say the same):

1) [lib.replacement.functions] p2+3:

"2 - A C++ program may provide the definition for any of eight dynamic memory
allocation function signatures declared in header <new> (3.7.3, clause
18):[..]"

"3 - The program’s definitions are used instead of the default versions
supplied by the implementation (18.4). Such replacement occurs prior to program
startup (3.2, 3.6)."

[C++11 adds here: "The program’s definitions shall not be specified as inline."
But we have no inline problem here]

2) [lib.new.delete.single] p2 or p11:

"Replaceable: a C++ program may define a function with this function signature
that displaces the default version defined by the C++ Standard library."

Especially note that (2) says "this function signature", which does IMO not
allow to require the addition of export directives or anything else.

Reply via email to