Add alloc_construct overload for non-const lvalue reference

This commit is contained in:
Glen Fernandes
2019-05-19 21:14:23 -04:00
parent c96dfcec4a
commit 29f281fe7a

View File

@ -107,6 +107,13 @@ alloc_construct(A& a, T* p, const U& u)
{
std::allocator_traits<A>::construct(a, p, u);
}
template<class A, class T, class U>
inline void
alloc_construct(A& a, T* p, U& u)
{
std::allocator_traits<A>::construct(a, p, u);
}
#endif
template<class A, class T>
@ -179,6 +186,13 @@ alloc_construct(A&, T* p, const U& u)
{
::new(static_cast<void*>(p)) T(u);
}
template<class A, class T, class U>
inline void
alloc_construct(A&, T* p, U& u)
{
::new(static_cast<void*>(p)) T(u);
}
#endif
template<class A, class T>