Skip to content

Commit 0585342

Browse files
author
Michael Blome
committed
updated page on bool
1 parent 599600a commit 0585342

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

docs/cpp/bool-cpp.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,14 @@ ms.workload: ["cplusplus"]
2020
# bool (C++)
2121
This keyword is a built-in type. A variable of this type can have values [true](../cpp/true-cpp.md) and [false](../cpp/false-cpp.md). Conditional expressions have the type `bool` and so have values of type `bool`. For example, `i!=0` now has **true** or **false** depending on the value of `i`.
2222

23-
**Visual Studio 2017 version 15.3 and later** (available with [/std:c++17](../build/reference/std-specify-language-standard-version.md)): The operand of a postfix or prefix increment or decrement operator may not be of type `bool`.
23+
**Visual Studio 2017 version 15.3 and later** (available with [/std:c++17](../build/reference/std-specify-language-standard-version.md)): The operand of a postfix or prefix increment or decrement operator may not be of type `bool`. In other words, given a variable **b** of type **bool**, these expressions are no longer allowed:
24+
25+
```cpp
26+
b++;
27+
++b;
28+
b--;
29+
--b;
30+
```
2431

2532
The values **true** and **false** have the following relationship:
2633

0 commit comments

Comments
 (0)