Skip to content

Commit c62fbbd

Browse files
committed
Merge previous commit
1 parent 90f1c83 commit c62fbbd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/cpp2/declarations.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ n: namespace
185185

186186
## <a id="aliases"></a> Aliases
187187

188-
Aliases are pronounced **"synonym for**, and written using the same **name `:` kind `=` value** [declaration syntax](../cpp2/declarations.md) as everything in Cpp2:
188+
Aliases are pronounced **"synonym for"**, and written using the same **name `:` kind `=` value** [declaration syntax](../cpp2/declarations.md) as everything in Cpp2:
189189

190190
- **name** is declared to be a synonym for **value**.
191191

@@ -222,7 +222,7 @@ main: () = {
222222

223223
### <a id="type-aliases"></a> Type aliases
224224

225-
A namespace alias is written the same way as a [type](types.md), but using `==` and with the name of another type as its value. For example:
225+
A type alias is written the same way as a [type](types.md), but using `==` and with the name of another type as its value. For example:
226226

227227
``` cpp title="Type aliases" hl_lines="1 2 7 10"
228228
// 'imap<T>' is a type defined as a synonym for 'std::map<i32, T>'
@@ -234,7 +234,7 @@ main: () = {
234234
map2: imap<std::string> = ();
235235

236236
// Assertion they are the same type, using the same_as concept
237-
assert( std::same_as< decltype(map1), decltype(map2) > );
237+
static_assert( std::same_as< decltype(map1), decltype(map2) > );
238238
}
239239
```
240240

@@ -252,7 +252,7 @@ main: () = {
252252
ints: std::array<i32, square(4)> = ();
253253

254254
// Assertion that the size is the square of 4
255-
assert( ints.size() == 16 );
255+
static_assert( ints.size() == 16 );
256256

257257
// And if can be used at run time, with run time values
258258
std::cout << "the square of 4 is (square(4))$\n";
@@ -274,7 +274,7 @@ BufferSize: i32 == 1'000'000;
274274

275275
main: () = {
276276
buf: std::array<std::byte, BufferSize> = ();
277-
assert( buf.size() == BufferSize );
277+
static_assert( buf.size() == BufferSize );
278278
}
279279
```
280280

0 commit comments

Comments
 (0)