1 parent efc6200 commit f28bfbbCopy full SHA for f28bfbb
1 file changed
content/posts/cpp-for-cscharp.md
@@ -333,19 +333,19 @@ These are all the ways you can declare an explicit return type in C++ syntax:
333
```cpp
334
// cpp
335
336
-// normal return type
+// normal
337
int Add(int a, int b)
338
{
339
return a + b;
340
}
341
342
-// trailing return type
+// trailing
343
auto Add(int a, int b) -> int // notice the "-> int"
344
345
346
347
348
+// trailing (lambda)
349
auto add = [](int a, int b) -> int // notice the "-> int"
350
351
0 commit comments