C++11 initializer list
Hello all,
this simple piece of code compiles correctly, but CLion detects an error:
#include <iostream>
#include <vector>
int main() {
std::vector<int> v{1, 2, 3, 4}; // Here an error is detected
for(auto& i : v) std::cout << i << std::endl;
return 0;
}
Error: too many arguments, expected 0
Is initializer list supported by CLion?
Please sign in to leave a comment.
Sounds like a bug to me. Have you made a ticket on the tracker?
Hi Cristiano.
Thanks for reporting, we have an issue in our tracker already:
https://youtrack.jetbrains.com/issue/CPP-1658
Feel free to comment or upvote.