From 2fc2ea0e45578704378ae452b6745d0c54b528fb Mon Sep 17 00:00:00 2001 From: Fred Tingaud Date: Mon, 16 Oct 2017 18:17:17 +0200 Subject: [PATCH] Correct typo in sample code for range-based for loop. (#458) --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 043f0192..b5f54d94 100644 --- a/README.md +++ b/README.md @@ -200,11 +200,12 @@ In C++11 mode, a ranged-based for loop should be used in preference to the `KeepRunning` loop for running the benchmarks. For example: ```c++ -static void BM_Faste(benchmark::State &st) { +static void BM_Fast(benchmark::State &state) { for (auto _ : state) { FastOperation(); } } +BENCHMARK(BM_Fast); ``` The reason the ranged-based for loop is faster than using `KeepRunning`, is