This is an automated email from the ASF dual-hosted git repository.

alsay pushed a commit to branch hll_sketch
in repository 
https://gitbox.apache.org/repos/asf/incubator-datasketches-postgresql.git

commit aa7bc09d3a13a560492b652ed86181aef5b5df31
Author: AlexanderSaydakov <[email protected]>
AuthorDate: Wed Jun 26 14:50:08 2019 -0700

    c++11 construct method
---
 src/allocator.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/allocator.h b/src/allocator.h
index 8932a45..4d7ed00 100644
--- a/src/allocator.h
+++ b/src/allocator.h
@@ -60,8 +60,9 @@ public:
     return static_cast<size_type>(-1) / sizeof(T);
   }
 
-  void construct(pointer p, const value_type& x) {
-    new(p) value_type(std::forward<const value_type>(x));
+  template<typename... Args>
+  void construct(pointer p, Args&&... args) {
+    new(p) value_type(std::forward<Args>(args)...);
   }
   void destroy(pointer p) { p->~value_type(); }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to