Title
[tiny] Logical xor operator
Status
nad
Section
[expr]
Submitter
Alisdair Meredith

Created on 2012-10-28.00:00:00 last changed 133 months ago

Messages

Date: 2013-04-28.20:20:29

I have a low-priority issue for adding the (neglected) logical-xor operator, ^^. This has traditionally been dismissed as un-necessary, as it is equivalent to boolean operator!=, and there is no short-circuiting benefit to justify adding it. However, contextual conversions to 'bool' are handled specially for logical operators, and in that context it would be completing a hole in the language. I wish I had a better example, but pulling from the standard library:

   function<void()> a;
   function<void()> b;
   assert(a != b);  // does not compile
   assert(a ^^ b);  // would compile, and assert!

Bristol 2013: EWG doesn't believe reopening this discussion, it's been tried previously and it's unlikely that a new round would lead to anything. NAD.

History
Date User Action Args
2013-04-28 20:20:29adminsetstatus: open -> nad
2012-10-28 00:00:00admincreate