Skip to content

Commit 100d09b

Browse files
authored
Update hello-world.md for changes to terse function declarations (#1359)
* Update hello-world.md for changes to terse function declarations Add braces around the body so it is no longer a deduced return type. Signed-off-by: Greg Marr <[email protected]> * update short form of clean-cpp1 argument Signed-off-by: Greg Marr <[email protected]> --------- Signed-off-by: Greg Marr <[email protected]>
1 parent b6ad7e6 commit 100d09b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/welcome/hello-world.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ main: () = {
2424
hello( words[1] );
2525
}
2626

27-
hello: (msg: std::string_view) =
27+
hello: (msg: std::string_view) = {
2828
std::cout << "Hello, (msg)$!\n";
29+
}
2930
```
3031

3132
This short program code already illustrates a few Cpp2 essentials.
@@ -151,4 +152,4 @@ Hello, world!
151152
### &#10148; Next: [Adding cppfront to your existing C++ project](integration.md)
152153

153154

154-
[^clean-cpp1]: For presentation purposes, this documentation generally shows the `.cpp` as generated when using cppfront's `-c` (short for `-clean-cpp1`), which suppresses extra information cppfront normally emits in the `.cpp` to light up C++ tools (e.g., to let IDEs integrate cppfront error message output, debuggers step to the right lines in Cpp2 source code, and so forth). In normal use, you won't need or even want `-c`.
155+
[^clean-cpp1]: For presentation purposes, this documentation generally shows the `.cpp` as generated when using cppfront's `-cl` (short for `-clean-cpp1`), which suppresses extra information cppfront normally emits in the `.cpp` to light up C++ tools (e.g., to let IDEs integrate cppfront error message output, debuggers step to the right lines in Cpp2 source code, and so forth). In normal use, you won't need or even want `-cl`.

0 commit comments

Comments
 (0)