https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110092

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This seems more like a bug in the IDE than in GCC. If you don't include the
header at all then GCC tells you the right header:

sp.cc: In function ‘int main()’:
sp.cc:2:8: error: ‘shared_ptr’ is not a member of ‘std’
    2 |   std::shared_ptr<int> s;
      |        ^~~~~~~~~~
sp.cc:1:1: note: ‘std::shared_ptr’ is defined in header ‘<memory>’; did you
forget to ‘#include <memory>’?
  +++ |+#include <memory>
    1 | int main() {

Reply via email to