Skip to content

Commit fd0c089

Browse files
for_each_n update to example
1 parent 89a1ca0 commit fd0c089

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

docs/standard-library/algorithm-functions.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2266,13 +2266,11 @@ otherwise the first element.
22662266
### Example
22672267

22682268
This example depicts a user-defined function object class, production code often
2269-
uses [`lambda`](https://docs.microsoft.com/en-us/cpp/cpp/lambda-expressions-in-cpp?view=msvc-170)s to achieve the same result with less code
2270-
2271-
Example requires `c++17`
2269+
uses [`lambda`](https://docs.microsoft.com/cpp/cpp/lambda-expressions-in-cpp?view=msvc-170)s to achieve the same result with less code
22722270

22732271
```cpp
22742272
// alg_for_each_n.cpp
2275-
// compile with: /EHsc
2273+
// compile with /EHsc and /std:c++17 (or higher)
22762274
#include <algorithm>
22772275
#include <iostream>
22782276
#include <vector>

0 commit comments

Comments
 (0)