== Why is this an issue?

Even though the {cpp} standard defines both "Primary" and "Alternative" operators, it is _not_ a good idea to use the alternatives. Developers seeing an alphabetical name expect a variable, a function, a class, a namespace... in short, anything but an operator, and they will be confused at best by code that uses such operators.

[frame=all]
[cols="^1,^1"]
|===
|Primary |Alternative

|&&|and
|&=|and_eq
|&|bitand
|\||bitor
|~|compl
|!|not 
|!=|not_eq
|\|\||or
|\|=|or_eq
|^|xor
|^=| xor_eq
|===


=== Noncompliant code example

[source,cpp]
----
if (not valid or error) { // Noncompliant
  /* ... */
} 
----


=== Compliant solution

[source,cpp]
----
if (!valid || error) {
  /* ... */
} 
----


ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

=== Message

Replace alternative operator "XX" with "YY".


=== Highlighting

alternative operator


'''
== Comments And Links
(visible only on this page)

=== relates to: S2010

=== on 29 Jun 2016, 17:30:31 Ann Campbell wrote:
\[~alban.auzeill] this is a great rule! Alternative operators look like a horrible idea to me. I've edited the description without (I believe) changing the meaning. I've also upgraded this to Major & changed the tag.

endif::env-github,rspecator-view[]
