CLion auto includes internal headers


I'm new to c++ development and since I'm using PyCharm for python I thought I would give the CLion IDE a try for learning c++. I'm doing a few tutorials and I'm a bit confused about the automatic include statements.

For example if I'm writing std::for_each the IDE prompts me to choose between bits/algorithmfwd.h or bits/stl_algo.h, but I guess the correct thing is to include <algorithms>? I'm using windows and I get the same behavour with cygwin and mingw. I wonder if I have set up something wrong with the build system or is it something else that I'm not thinking about here?


1 comment
Comment actions Permalink

Hi Viktor.

We have an issue in the tracker:
We are planning to improve it soon.
Feel free to comment or upvote.

Also we have a common task for auto-import:
Please upvote what do you want.

You can turn off auto-import pop ups via Editor | General | Auto-import. The pop-up with include suggestion won’t show up in that case, though you’ll still be able to invoke an auto-import when necessary using an intention action (Alt+Enter).

Please find out more information about this feature in our blog:

Please sign in to leave a comment.