Problem with c++20 modules
Answered
Hi,
I would like to use the C++20 modules feature (using clion 2020.3), and although I selected c++20 for my project, the compilation of a simple hello world program fails because of that specific modules instruction that you can see below in the first line of the program, how can I make it work ?
import <iostream>;
int main() {
std::cout << "Hello, World!" << std::endl;
return 0;
}
Please sign in to leave a comment.
CMake currently does not support C++20 modules - https://gitlab.kitware.com/cmake/cmake/-/issues/18355.
It seems that CMake now supports modules.
I am able to configure, build and run a simple C++20 project. It works on the CLI, in CLion and in Visual Studio.
However, CLion highlights in red everything related to C++20 modules. I understand that MSVC has its own way of classifying modules, but it would be wonderful if it could work out of the box.
B Dubreuil please follow https://youtrack.jetbrains.com/issue/CPP-19267. See https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications if you are not familiar with YouTrack.