re PR libstdc++/89824 (Variant jump table reserves space for __variant_cookie twice)
PR libstdc++/89824 Fix based on a suggestion by Antony Polukhin. * include/std/variant (__gen_vtable): Don't reserve an additional table slot, _Multi_array already does that. From-SVN: r269941
This commit is contained in:
parent
8be4d02ba9
commit
11767f80f0
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
|||
2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
|
||||
|
||||
PR libstdc++/89824
|
||||
Fix based on a suggestion by Antony Polukhin.
|
||||
* include/std/variant (__gen_vtable): Don't reserve an
|
||||
additional table slot, _Multi_array already does that.
|
||||
|
||||
2019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
|
||||
|
||||
PR libstdc++/89816
|
||||
|
|
|
@ -904,9 +904,7 @@ namespace __variant
|
|||
using _Func_ptr = _Result_type (*)(_Visitor&&, _Variants...);
|
||||
using _Array_type =
|
||||
_Multi_array<_Func_ptr,
|
||||
(variant_size_v<remove_reference_t<_Variants>>
|
||||
+ (is_same_v<_Result_type, __variant_cookie> ? 1 : 0))
|
||||
...>;
|
||||
variant_size_v<remove_reference_t<_Variants>>...>;
|
||||
|
||||
static constexpr _Array_type
|
||||
_S_apply()
|
||||
|
|
Loading…
Add table
Reference in a new issue