Why std::vector is not a valid range type?

已回答

In Clion, when using std::vector in a range based for loop, the editor always complains vector is not valid range type.

I understand adding or deleting element inside the range based for loop will cause trouble, but purely loop the vector will be fine. Can someone explain why std::vector is not valid range type?

1

Hello!

Could you please specify what compiler version you are using?

0
Avatar
Permanently deleted user

I'm using gcc 4.8

0

Unfortunately, I can't reproduce the issue on my side. What CLion version do you use? Also please provide the screenshot of the issue.

0
Avatar
Permanently deleted user

Hello, i have the same issue

gcc 7.2.0

CLion 2017.1.3

0

@Slabodkin, the error reported by you should be fixed in 2018.1.* EAP (expected next week). Please check it when the build becomes available.

0

请先登录再写评论。