Wrong inspection for stl queue - expression must be rvalue

Answered

CLion 2017.1.2
Build #CL-171.4694.4, built on May 16, 2017

JRE: 1.8.0_112-release-736-b21 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.6

int main() {
vector<int> v1 = {0,1,2};
vector<int> v2 = {2,3,4};
queue<vector<int>> q3 = {};
q3.push(v1);
q3.push(v2);
vector<int> test3 = q3.front(); // warning: expression must be rvalue
q3.pop();
return 0;
}
1
3 comments
Avatar
Permanently deleted user

Updated my clion, still observe the issue

 

CLion 2017.2.3
Build #CL-172.4343.16, built on October 2, 2017

JRE: 1.8.0_152-release-915-b12 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.6

0

Hi! Several issues related to this were fixed in CLion 2017.3 EAPs. Could you please try using the latest EAP? I can reproduce the issue with CLion 2017.2.3 and can't with the 2017.3 RC 2.

0
Avatar
Permanently deleted user

Confirmed. 2017.3 fixes the inspection

0

Please sign in to leave a comment.