DigitalInBlue / Celero

C++ Benchmark Authoring Library/Framework
Other
822 stars 96 forks source link

Missing brace in example code in README #133

Closed mflehmig closed 5 years ago

mflehmig commented 5 years ago

Hi there,

thanks for this useful project!

There is a little code issue within the README in the section "Using the Code":

    for(int i = 0; i < totalNumberOfTests; i++)
    {
        // ExperimentValues is part of the base class and allows us to specify
        // some values to control various test runs to end up building a nice graph.
        problemSpace.push_back({int64_t(pow(2, i+1)});
    }

First, there is a missing closing round brace. Furthermore, why should one use a brace initializer list (holding only one element) at this point?

DigitalInBlue commented 5 years ago

Fixed. Thanks for using the library and for your feedback!

As for why I chose to use a brace initializer: because I wanted to. Here it is a style choice. It is a braced initializer, not necessarily just for lists.