I have the following code snippet, which is exactly like I want it:
#include <iostream>
int main(int argc, char* argv[])
{
for (auto i: { 1, 2, 3 })
{
std::cout << i << std::endl;
}
}
Unfortunately astyle turns this into:
#include <iostream>
int main(int argc, char* argv[])
{
for (auto i :
{
1, 2, 3
})
{
std::cout << i << std::endl;
}
}
Is there any way I can make astyle treat initializer lists braces differently(i.e. ignore them)?
These are my current options:
--mode=c --style=allman --indent=spaces=4 -max-code-length=100 --attach-namespaces --pad-oper --pad-header