This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
As the PR points out, we aren't qualifying calls to __ref_cast, and have 'constexpr' on function templates that can never be usable in constant expressions. This fixes it, and also simplifies __variant::__erased_dtor by using std::_Destroy, although that requires including quite a lot more code, for iterator_traits and allocator_traits. If that matters (probably not) then <bits/stl_construct.h> could be split up to move _Construct and _Destroy to a new <bits/stl_construct_base.h>. Or maybe I should just leave __erased_dtor alone (apart from qualifying the __ref_cast call). Anybody feel strongly either way? PR libstdc++/80939 * include/std/variant (__erased_ctor, __erased_assign, __erased_swap) (__erased_hash): Remove constexpr specifier and qualify calls to __ref_cast. (__erased_dtor): Remove constexpr specifier and use _Destroy.
Attachment:
patch.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |