Skip to content

Commit 7322e25

Browse files
committed
edits
1 parent 6f105a9 commit 7322e25

2 files changed

Lines changed: 13 additions & 21 deletions

File tree

‎docs/c-runtime-library/reference/not-eq.md‎

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: "Learn more about: not_eq"
33
title: "not_eq"
4-
ms.date: "8/7/2024"
4+
ms.date: 08/09/2024
55
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
66
api_type: ["DLLExport"]
77
topic_type: ["apiref"]
@@ -21,13 +21,12 @@ An alternative spelling for the **`!=`** operator.
2121
## Remarks
2222
2323
C++:
24-
- **`not_eq`** can be used as alternative to **`!=`**. The [`/permissive-`](../build/reference/permissive-standards-conformance.md) or [`/Za`](../build/reference/za-ze-disable-language-extensions.md) compiler option is required to use the alternative spelling.
24+
- **`not_eq`** can be used as alternative to **`!=`**. The [`/permissive-`](../build/reference/permissive-standards-conformance.md) or [`/Za`](../build/reference/za-ze-disable-language-extensions.md) compiler option is required.
25+
- Including `<iso646.h>` or `<ciso646>` is deprecated. You can use the alternative spelling without including any header files.
2526
- There's no alternative spelling for **`==`**.
26-
- Including `<iso646.h>` or `<ciso646>` is deprecated. Use the alternative spelling directly.
2727
2828
C:
2929
- **`not_eq`** is an alternative spelling for **`!=`**. It is provided as a macro in `<iso646.h>`, which you must `#include`.
30-
- The alternative spelling isn't treated as a keyword.
3130
- There's no alternative spelling for **`==`**.
3231
3332
## Example
@@ -41,9 +40,9 @@ int main( )
4140
{
4241
int x = 1, y = 2;
4342
44-
// The alternative spelling is available in C++ and C
45-
// This example is for C++, so no header file is needed to use the alternative spelling
46-
// When compiling for C, #include <iso646.h> to use the alternative spelling
43+
// not_eq is available in C++ and C
44+
// This example is for C++, so no header file is needed to use not_eq
45+
// When compiling for C, #include <iso646.h> to use not_eq
4746
if (x not_eq y)
4847
{
4948
std::cout << "Not equal\n";
@@ -57,9 +56,9 @@ Not equal
5756

5857
## Requirements
5958

60-
**Header:** `<iso646.h>` is only necessary if you are compiling for C. In C++ the alternative spelling is recognized automatically.
59+
**Header:** `<iso646.h>` is necessary if you are compiling for C.
6160

6261
## See also
6362

64-
[and_eq](/cpp/c-runtime-library/reference/and-eq?.md)\
65-
[or_eq](/cpp/c-runtime-library/reference/or-eq?.md)\
63+
[`and_eq`](/cpp/c-runtime-library/reference/and-eq?.md)\
64+
[`or_eq`](/cpp/c-runtime-library/reference/or-eq?.md)\

‎docs/cpp/equality-operators-equal-equal-and-exclpt-equal.md‎

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
title: "Equality operators: == and !="
33
description: "The C++ standard language equal-to and not-equal-to operator syntax and use."
4-
ms.date: 8/2/2024
5-
f1_keywords: ["!=", "==", "not_eq_cpp"]
6-
helpviewer_keywords: ["!= operator", "equality operator", "not equal to comparison operator", "equality operator [C++], syntax", "== operator", "not_eq operator", "equal to operator"]
4+
ms.date: 08/09/2024
5+
f1_keywords: ["!=", "=="]
6+
helpviewer_keywords: ["!= operator", "equality operator", "not equal to operator", "equality operator [C++], syntax", "== operator", "equal to operator"]
77
---
88
# Equality operators: `==` and `!=`
99

@@ -14,11 +14,10 @@ helpviewer_keywords: ["!= operator", "equality operator", "not equal to comparis
1414
1515
## Remarks
1616

17-
The binary equality operators compare their operands for strict equality or inequality. If you are looking for information about overloading these operators instead, see [Operator overloading](../cpp/overloading.md).
17+
The equality operators compare their operands for strict equality or inequality. If you are looking for information about overloading these operators, see [Operator overloading](../cpp/overloading.md).
1818

1919
The equal-to operator (**`==`**) returns **`true`** if both operands have the same value; otherwise **`false`**.\
2020
The not-equal-to operator (**`!=`**) returns **`true`** if the operands don't have the same value; otherwise **`false`**.\
21-
The alternative spelling `not_eq` returns **`true`** if the operands don't have the same value; otherwise **`false`**.
2221

2322
In C and C++, **`not_eq`** can be used as alternative to **`!=`**. For more information, see [`not-eq`](../c-runtime-library/reference/not-eq.md).
2423

@@ -48,12 +47,6 @@ Equal
4847
Not equal
4948
```
5049

51-
Equality operators can compare pointers to members of the same type. The pointers are equal if they point to the same member or if they are both **`nullptr`**. Otherwise, they are not equal. For example
52-
53-
```cpp
54-
55-
```
56-
5750
## See also
5851

5952
[`not-eq`](../c-runtime-library/reference/not-eq.md)\

0 commit comments

Comments
 (0)