Compile error when `-ffreestanding` is enabled on GCC
mingxwa opened this issue · comments
Here is the output from my local dev machine when -ffreestanding
is enabled on GCC.
In file included from \\work\1.cc:1:
\\work\proxy.h: In function 'pro::proxy<F> pro::details::make_proxy_impl(Args&& ...)':
\\work\proxy.h:808:12: error: 'allocator' is not a member of 'std'
808 | std::allocator<T>{}, std::forward<Args>(args)...);
| ^~~~~~~~~
\\work\proxy.h:15:1: note: 'std::allocator' is defined in header '<memory>'; did you forget to '#include <memory>'?
14 | #include <utility>
+++ |+#include <memory>
15 |
\\work\proxy.h:808:23: error: expected primary-expression before '>' token
808 | std::allocator<T>{}, std::forward<Args>(args)...);
| ^
\\work\proxy.h:808:24: error: expected primary-expression before '{' token
808 | std::allocator<T>{}, std::forward<Args>(args)...);
| ^