getfem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Getfem-commits] r5093 - /trunk/getfem/src/getfem/getfem_copyable_ptr.h


From: andriy . andreykiv
Subject: [Getfem-commits] r5093 - /trunk/getfem/src/getfem/getfem_copyable_ptr.h
Date: Thu, 08 Oct 2015 10:19:20 -0000

Author: andrico
Date: Thu Oct  8 12:19:19 2015
New Revision: 5093

URL: http://svn.gna.org/viewcvs/getfem?rev=5093&view=rev
Log:
replacing std::make_unique call with std::unique<T>(new T) to support older 
compilers

Modified:
    trunk/getfem/src/getfem/getfem_copyable_ptr.h

Modified: trunk/getfem/src/getfem/getfem_copyable_ptr.h
URL: 
http://svn.gna.org/viewcvs/getfem/trunk/getfem/src/getfem/getfem_copyable_ptr.h?rev=5093&r1=5092&r2=5093&view=diff
==============================================================================
--- trunk/getfem/src/getfem/getfem_copyable_ptr.h       (original)
+++ trunk/getfem/src/getfem/getfem_copyable_ptr.h       Thu Oct  8 12:19:19 2015
@@ -49,12 +49,12 @@
 
   copyable_ptr(std::unique_ptr<T> p) : p_(std::move(p)) {}
 
-  copyable_ptr(const copyable_ptr<T> &x) : p_(x.p_ ? 
std::make_unique<T>(*x.p_) : nullptr)  {}
+  copyable_ptr(const copyable_ptr<T> &x) : p_(x.p_ ? std::unique_ptr<T>(new 
T(*x.p_)) : nullptr)  {}
 
   copyable_ptr(copyable_ptr<T> &&x) : p_(std::move(*x.p_))  {}
 
   copyable_ptr<T> &operator=(const copyable_ptr<T> &x){
-    if (x.p_) p_ = std::make_unique<T>(*x.p_);
+    if (x.p_) p_ = std::unique_ptr<T>(new T(*x.p_));
     return *this;
   }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]