From e1a7c18c37ec2c8fe696d28f29e4383a9cbb031b Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Sat, 8 Apr 2017 12:37:53 -0300 Subject: [PATCH] Fix minor formatting issues Changed the order of the title to reflect the actual order of the text and fixed some minor formatting on the text :) --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ac6d4dc..dbc8f8e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# C++11/14/17 +# C++17/14/11 ## Overview Many of these descriptions and examples come from various resources (see [Acknowledgements](#acknowledgements) section), summarized in my own words. @@ -515,7 +515,7 @@ static_assert(std::is_same::value == 1); ``` ### Relaxing constraints on constexpr functions -In C++11, `constexpr` function bodies could only contain a very limited set of syntax, including (but not limited to): `typedef`s, `using`s, and a single `return` statement. In C++14, the set of allowable syntax expands greatly to include the most common syntax such as `if` statements, multiple `return`s, loops, etc. +In C++11, `constexpr` function bodies could only contain a very limited set of syntaxes, including (but not limited to): `typedef`s, `using`s, and a single `return` statement. In C++14, the set of allowable syntaxes expands greatly to include the most common syntax such as `if` statements, multiple `return`s, loops, etc. ```c++ constexpr int factorial(int n) { if (n <= 1) { @@ -676,7 +676,7 @@ addX(1); // == 2 auto getXRef = [&]() -> int& { return x; }; getXRef(); // int& to `x` ``` -By default value-captures cannot be modified inside the lambda because the compiler-generated method is marked as `const`. The `mutable` keyword allows modifying captured variables. The keyword is placed after the parameter-list (which must be present even if it is empty). +By default, value-captures cannot be modified inside the lambda because the compiler-generated method is marked as `const`. The `mutable` keyword allows modifying captured variables. The keyword is placed after the parameter-list (which must be present even if it is empty). ```c++ int x = 1;