forked from boostorg/core
Add alloc_construct overload for non-const lvalue reference
This commit is contained in:
@ -107,6 +107,13 @@ alloc_construct(A& a, T* p, const U& u)
|
|||||||
{
|
{
|
||||||
std::allocator_traits<A>::construct(a, p, 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
|
#endif
|
||||||
|
|
||||||
template<class A, class T>
|
template<class A, class T>
|
||||||
@ -179,6 +186,13 @@ alloc_construct(A&, T* p, const U& u)
|
|||||||
{
|
{
|
||||||
::new(static_cast<void*>(p)) T(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
|
#endif
|
||||||
|
|
||||||
template<class A, class T>
|
template<class A, class T>
|
||||||
|
Reference in New Issue
Block a user