mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 12:44:42 +03:00
Merge pull request #408 from Eliyahu-Ravuna/patch-20
The vector was missing template arguments. Fixed
This commit is contained in:
@@ -9120,7 +9120,7 @@ Simple code can be very fast. Optimizers sometimes do marvels with simple code
|
||||
|
||||
// clear expression of intent, fast execution
|
||||
|
||||
vector v(100000);
|
||||
vector<uint8_t> v(100000);
|
||||
|
||||
for(auto& c : v)
|
||||
c = ~c;
|
||||
@@ -9129,7 +9129,7 @@ Simple code can be very fast. Optimizers sometimes do marvels with simple code
|
||||
|
||||
// intended to be faster, but is actually slower
|
||||
|
||||
vector v(100000);
|
||||
vector<uint8_t> v(100000);
|
||||
|
||||
for(size_t i=0; i<v.size(); i+=sizeof(uint64_t))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user