[llvm] r231222 - Make format_object_base explicitly copyable, so format_objects can be copied without relying on the implicit copy ctor

David Blaikie dblaikie at gmail.com
Tue Mar 3 23:35:02 PST 2015


Author: dblaikie
Date: Wed Mar  4 01:35:02 2015
New Revision: 231222

URL: http://llvm.org/viewvc/llvm-project?rev=231222&view=rev
Log:
Make format_object_base explicitly copyable, so format_objects can be copied without relying on the implicit copy ctor

Use of the implicit copy ctor is deprecated in C++11 in the presence of
a user declared dtor.

Modified:
    llvm/trunk/include/llvm/Support/Format.h

Modified: llvm/trunk/include/llvm/Support/Format.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Format.h?rev=231222&r1=231221&r2=231222&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Format.h (original)
+++ llvm/trunk/include/llvm/Support/Format.h Wed Mar  4 01:35:02 2015
@@ -38,6 +38,7 @@ class format_object_base {
 protected:
   const char *Fmt;
   ~format_object_base() {} // Disallow polymorphic deletion.
+  format_object_base(const format_object_base&) = default;
   virtual void home(); // Out of line virtual method.
 
   /// Call snprintf() for this object, on the given buffer and size.





More information about the llvm-commits mailing list