You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cpp2/aliases.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Aliases
2
2
3
-
Aliases are pronounced **"synonym for**, and written using the same **name `:` kind `=` value**[declaration syntax](../cpp2/declarations.md) as everything in Cpp2:
3
+
Aliases are pronounced **"synonym for"**, and written using the same **name `:` kind `=` value**[declaration syntax](../cpp2/declarations.md) as everything in Cpp2:
4
4
5
5
-**name** is declared to be a synonym for **value**.
6
6
@@ -37,7 +37,7 @@ main: () = {
37
37
38
38
## <aid="type-aliases"></a> Type aliases
39
39
40
-
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:
40
+
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:
41
41
42
42
```cpp title="Type aliases" hl_lines="1 2 7 10"
43
43
// 'imap<T>' is a type defined as a synonym for 'std::map<i32, T>'
@@ -49,7 +49,7 @@ main: () = {
49
49
map2: imap<std::string> = ();
50
50
51
51
// Assertion they are the same type, using the same_as concept
0 commit comments