Title
null pointer constant for exception_ptr
Status
nad
Section
[propagation]
Submitter
Jens Maurer

Created on 2007-07-20.00:00:00 last changed 171 months ago

Messages

Date: 2010-10-21.18:28:33

[ Bellevue: ]

Original implementation was possible using the "unspecified-null-pointer" idiom, similar to unspecified-bool.

Even simpler now with nullptr_t.

NAD Rationale : null pointer constant is a perfectly defined term, and while API is clearly implementable there is no need to spell out implementation details.

Date: 2007-07-20.00:00:00

From the Toronto Core wiki:

What do you mean by "null pointer constant"? How do you guarantee that exception_ptr() == 1 doesn't work? Do you even want to prevent that? What's the semantics? What about void *p = 0; exception_ptr() == p? Maybe disallow those in the interface, but how do you do that with portable C++? Could specify just "make it work".

Peter's response:

null pointer constant as defined in [conv.ptr]. Intent is "just make it work", can be implemented as assignment operator taking a unique pointer to member, as in the unspecified bool type idiom.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg3499
2007-07-20 00:00:00admincreate