I have come across this for-loop layout:
#include <iostream>
int main()
{
{
for (int i = 0; i != 10; ++i)
{
std::cout << "delete i->second;" << std::endl;
}
}
{
for (size_t i = 0; i < 20; ++i)
{
std::cout << "delete m_indices[i];" << std::endl;
}
}
return 0;
}
I was wondering what this extra layer of braces is for? This appears a few times in our code base.