Skip to content

Commit f0addd2

Browse files
authored
More docs reviews (#990)
1 parent 8d49525 commit f0addd2

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

docs/cpp2/common.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Cpp2 supports the same fundamental types as today's Cpp1, but additionally provi
9292
| `ulonglong` | `#!cpp unsigned long long` |
9393
| `longdouble` | `#!cpp long double` |
9494

95-
| For compatibility/interop only,<br> so deliberately ugly names | Synonym for | Notes |
95+
| For compatibility/interop only,<br> so deliberately ugly names | Synonym for (these multi-word<br> names are not allowed in Cpp2) | Notes |
9696
|---|---|---|
9797
| `_schar` | `#!cpp signed char` | Normally, prefer `i8` instead |
9898
| `_uchar` | `#!cpp unsigned char` | Normally, prefer `u8` instead |

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ main: () = {
99

1010
## <a id="what-is-cpp2"></a> What is Cpp2?
1111

12-
"Cpp2," short for "C++ syntax 2," is my ([Herb Sutter's](https://github.com/hsutter)) personal project to try to make writing ordinary C++ types/functions/objects be much **simpler and safer**, without breaking backward compatibility. Bjarne Stroustrup said it best:
12+
"Cpp2", short for "C++ syntax 2", is my ([Herb Sutter's](https://github.com/hsutter)) personal project to try to make writing ordinary C++ types/functions/objects be much **simpler and safer**, without breaking backward compatibility. Bjarne Stroustrup said it best:
1313

1414
> "Inside C++, there is a much smaller and cleaner language struggling to get out." <br>&emsp;&emsp;— Bjarne Stroustrup, _The Design and Evolution of C++_ (D&E), 1994
1515
>

docs/welcome/hello-world.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ auto hello(cpp2::in<std::string_view> msg) -> void {
9393
std::cout << ("Hello, " + cpp2::to_string(msg) + "!\n"); }
9494
```
9595
96-
Here we can see more of how Cpp2 makes it features work.
96+
Here we can see more of how Cpp2 makes its features work.
9797
9898
**How: Consistent context-free syntax.**
9999
@@ -108,15 +108,15 @@ Here we can see more of how Cpp2 makes it features work.
108108
109109
**How: Simplicity through generality + defaults.**
110110
111-
- **Line 7: `in` parameters** are implemented using `#cpp2::in<>`, which is smart enough to pass by `#!cpp const` value when that's safe and appropriate, otherwise by `#!cpp const&`, so you don't have to choose the right one by hand.
111+
- **Line 7: `in` parameters** are implemented using `#!cpp cpp2::in<>`, which is smart enough to pass by `#!cpp const` value when that's safe and appropriate, otherwise by `#!cpp const&`, so you don't have to choose the right one by hand.
112112
113113
**How: Order-independent by default.**
114114
115-
- **Lines 5 and 7: Order independence** happens because cppfront generates all the type and function forward declarations for you, so you don't have to. That's why `main` can just call `hello`: Both are forward-declared, so they can both see each other.
115+
- **Lines 5 and 7: Order independence** happens because cppfront generates all the type and function forward declarations for you, so you don't have to. That's why `main` can just call `hello`: both are forward-declared, so they can both see each other.
116116
117117
**How: Seamless compatibility and interop.**
118118
119-
- **Lines 9-11 and 16: Ordinary direct calls** to existing C++ code, so there's never a need for wrapping/marshaling/thunking.
119+
- **Lines 9-11 and 15: Ordinary direct calls** to existing C++ code, so there's never a need for wrapping/marshaling/thunking.
120120
121121
**How: C++ standard library always available.**
122122

docs/welcome/integration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
To start trying out Cpp2 syntax in any existing C++ project, just add a build step to translate the Cpp2 to Cpp1 syntax:
55

6+
- Copy the `.cpp` file to the same name with a `.cpp2` extension.
67
- Add the `.cpp2` file to the project, and ensure the `.cpp` is in C++20 mode.
78
- Tell the IDE to build that file using a custom build tool to invoke cppfront.
89

0 commit comments

Comments
 (0)