Skip to content

Commit b691225

Browse files
committed
[P3549] ... and typo
1 parent 154b1b5 commit b691225

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

3549_diverging_expressions/diverging-expressions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ There is another approach though.
233233

234234
Several languages have a notion of a bottom type (``) for diverging expressions. This type is spelled `Nothing` in Scala, `never` in TypeScript, `Never` in Python, `noreturn` in D, `!` in Rust, `void` in Haskell (but notably not `void` in C++), etc. This type represents an expression that diverges.
235235

236-
Let's imagine what it would look like if C++ also had such a type. We'll call it `noreturn_t`. It would some interesting properties:
236+
Let's imagine what it would look like if C++ also had such a type. We'll call it `noreturn_t`. It would have some interesting properties:
237237

238238
* You cannot produce an instance of such a type. It wouldn't be very divergent otherwise! In this case, it's not just that this type isn't constructible, but we would also have to eliminate all of C++'s other clever ways of producing a value (like `reinterpret_cast`, `std::bit_cast`, etc.).
239239
* On the other hand, `noreturn_t` is convertible to any other type (including reference types). This is currently impossible to emulate in C++ today, since you cannot make a type that is both convertible to `T` and `T&` for all `T`.

3549_diverging_expressions/p3549r1.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,7 @@ <h2 data-number="2.2" id="a-bottom-type"><span class="header-section-number">2.2
933933
C++), etc. This type represents an expression that diverges.</p>
934934
<p>Let’s imagine what it would look like if C++ also had such a type.
935935
We’ll call it <code class="sourceCode cpp">noreturn_t</code>. It would
936-
some interesting properties:</p>
936+
have some interesting properties:</p>
937937
<ul>
938938
<li>You cannot produce an instance of such a type. It wouldn’t be very
939939
divergent otherwise! In this case, it’s not just that this type isn’t

0 commit comments

Comments
 (0)