
21 Jan
2015
21 Jan
'15
9:36 p.m.
On Thu, Jan 22, 2015 at 12:27 AM, Peter Dimov
Andrzej Krzemienski wrote:
Are you saying that on a compiler where an operation on optional
might give wrong run-time result, the operation should be disabled (render a compile-time error)? I think that am I saying that if an operation on optional
is apt to result in dangling pointers on many popular compilers, the operation should be disabled for all compilers for consistency, not just those that will exhibit the failure. This interface is obviously too dangerous to be of any use and, while it will work on some compilers, its use will not be portable.
It's also possible to make the feature optional, so that it can be enabled by a macro.