From 29f281fe7ade7afa56073c4ef3906671ad7fb4ee Mon Sep 17 00:00:00 2001 From: Glen Fernandes Date: Sun, 19 May 2019 21:14:23 -0400 Subject: [PATCH] Add alloc_construct overload for non-const lvalue reference --- include/boost/core/alloc_construct.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/boost/core/alloc_construct.hpp b/include/boost/core/alloc_construct.hpp index c14b05c..7b87525 100644 --- a/include/boost/core/alloc_construct.hpp +++ b/include/boost/core/alloc_construct.hpp @@ -107,6 +107,13 @@ alloc_construct(A& a, T* p, const U& u) { std::allocator_traits::construct(a, p, u); } + +template +inline void +alloc_construct(A& a, T* p, U& u) +{ + std::allocator_traits::construct(a, p, u); +} #endif template @@ -179,6 +186,13 @@ alloc_construct(A&, T* p, const U& u) { ::new(static_cast(p)) T(u); } + +template +inline void +alloc_construct(A&, T* p, U& u) +{ + ::new(static_cast(p)) T(u); +} #endif template