I have CLion 1.2 on Mint Maya with installed gcc5. Default gcc is 4.6. (/usr/bin/gcc -> gcc-4.6)
Compiler set through CMakeLists and Settings
[toolchain settings] https://www.dropbox.com/s/se5nxfdki7zdkhm/screen_settings_toolchain.png
[sample] https://www.dropbox.com/s/ss7r6kss64k00ez/screen.png
Editor say: Parameter type mismatch: Expression must be rvalue on std::thread t1(f1) but I can build and run this sample
What is wrong?
Sample:
void f1(){
cout<<"hi"<<endl;
}
int main() {
cout << "Hello, World!" << endl;
std::thread t1(f1);//Parameter type mismatch: Expression must be rvalue
t1.join();
return 0;
}
I believe it's a parser bug of clion
Affected versions: CLion 1.2
Fix versions: CLion 2016.1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With