[PATCH v3] libstdc++: Mark <queue>, <deque> constexpr
Yuao Ma
addr2line@gmail.com
Wed Aug 19 13:10:35 GMT 2026
On Wed, Aug 19, 2026 at 7:07 PM Jonathan Wakely <jwakely@redhat.com> wrote:
>
> 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.
>
Thanks for the explanation! In this case I think maybe there is no
major blocker for p3372r2. Glad to help implement unfinished ones.
More information about the Libstdc++
mailing list