On 25/07/18 21:42 +0200, François Dumont wrote:
Hi
It has already been noticed that there are 2 ebo helpers in the
lib. Here is a patch to use 1.
* include/bits/ebo_helper.h: New.
* include/Makefile.am: Add latter.
* include/Makefile.in: Regenerate.
* include/bits/hashtable_policy.h: Adapt.
* include/bits/shared_ptr_base.h: Adapt.
I think we want an extra template parameter which is used for a tag
type, to guarantee that the two uses (in hash tables and in shared
ptr) can never conflict and produce ambiguous bases.
i.e.
template<int _Nm, typename _Tp, typename _Tag,
bool __use_ebo = !__is_final(_Tp) && __is_empty(_Tp)>
struct _Ebo_helper;
and:
using _Sp_ebo_helper = __detail::_Ebo_helper<_Nm, _Tp, _Sp_counted_base<>>;
(for example).