[PATCH v3] libstdc++: Mark <queue>, <deque> constexpr

Jonathan Wakely jwakely@redhat.com
Wed Aug 19 11:07:51 GMT 2026


On Thu, 06 Aug 2026 at 19:51 +0800, Yuao Ma wrote:
>Looking forward to this! Just a quick question, does this patch
>resolve the error in https://compiler-explorer.com/z/39MsxKxTT ?

The -fimplicit-constexpr option only works for inline functions. Since
that function is not inline, you can't make it a constexpr function by
using -fimplicit-constexpr:

   template<typename _Tp, typename _Alloc>
     void
     _Deque_base<_Tp, _Alloc>::
     _M_initialize_map(size_t __num_elements)

Because the patch makes everything explicitly constexpr, of course it
resolves that error.



More information about the Libstdc++ mailing list