Boost logo

Boost Users :

Subject: Re: [Boost-users] Issues trying to use boost::unordered_map
From: Ram (sourceopen_at_[hidden])
Date: 2016-09-29 00:39:00


Hi Gavin/Joaquin,

Since we saw the error in construct in buckets.hpp. I searched for
"construct(" in my pre-processed file. This is the template replacement,

.
.
.

template<class _Ty1,
class _Ty2> inline
void _Construct(_Ty1 *_Ptr, _Ty2&& _Val)
{
void *_Vptr = _Ptr;
::new (_Vptr) _Ty1(::std:: forward<_Ty2>(_Val));
}
template<class _Ty1> inline
void _Construct(_Ty1 *_Ptr)
{
void *_Vptr = _Ptr;
::new (_Vptr) _Ty1();
}
.
.
.

struct _Alloc_construct { template<class _Ty, class _Objty, class...
_Types> static auto _Fn(int, _Ty& _Al, _Objty *_Ptr, _Types&&... _Args) ->
decltype( _Al.construct(_Ptr, ::std:: forward<_Types>(_Args)...)) {
_Al.construct(_Ptr, ::std:: forward<_Types>(_Args)...); } template<class
_Ty, class _Objty, class... _Types> static auto _Fn(_Wrap_int, _Ty&, _Objty
*_Ptr, _Types&&... _Args) -> void { ::new (static_cast<void *>(_Ptr))
_Objty(::std:: forward<_Types>(_Args)...); } };
.
.
.
template<class _Ty,
class... _Types>
static void construct(_Alloc& _Al, _Ty *_Ptr,
_Types&&... _Args)
{
_Alloc_construct::_Fn(0, _Al, _Ptr,
::std:: forward<_Types>(_Args)...);
}
.
.
.
void construct(_Ty *_Ptr) { ::new ((void *)_Ptr) _Ty(); } void
construct(_Ty *_Ptr, const _Ty& _Val) { ::new ((void *)_Ptr) _Ty(_Val); }
template<class _Objty, class... _Types> void construct(_Objty *_Ptr,
_Types&&... _Args) { ::new ((void *)_Ptr) _Objty(::std::
forward<_Types>(_Args)...); }
.
.
.
Thanks,
Ram



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net