https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114866
Bug ID: 114866 Summary: <memory> & out_ptr in freestanding Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: weidmann at acm dot org Target Milestone: --- With gcc version 14.0.1 20240411 (Red Hat 14.0.1-0) (GCC) on x86_64 GNU/Linux. Using the following command options: g++ -std=c++23 -fno-rtti -fno-exceptions -fno-non-call-exceptions -fno-unwind-tables -fno-use-cxa-atexit -fno-enforce-eh-specs -faligned-new -fsized-deallocation -fpermissive -m32 -ffreestanding -fomit-frame-pointer -Os -fno-asynchronous-unwind-tables -fno-builtin -Wall -fanalyzer I get the following error: In file included from /usr/include/c++/14/memory:95, ... /usr/include/c++/14/bits/out_ptr.h:57:22: error: ‘__is_shared_ptr’ was not declared in this scope 57 | static_assert(!__is_shared_ptr<_Smart> || sizeof...(_Args) != 0, Is #if _GLIBCXX_HOSTED missing around #if __cplusplus > 202002L # include <bits/out_ptr.h> #endif > As a quick workaround for building my project, I define #define > _GLIBCXX_OUT_PTR_H before including <memory>