Le 11/11/2014 20:58, Georg Baum a écrit :
commit 8f93600d3fa8182ba43973075cf37e7ecb2be8d3
Author: Georg Baum <b...@lyx.org>
Date:   Tue Nov 11 07:22:14 2014 +0100

     Prevent accidental usage of wrong copy constructor

Is this what we use boost:noncopyable for in some places? It would be nice to keep the same form in all these places.

diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 103428a..37e26a8 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -282,6 +282,10 @@ private:

  class Paragraph::Private
  {
+       // Enforce our own "copy" constructor by declaring the standard one and
+       // the assignment operator private without implementing them.
+       Private(Private const &);
+       Private & operator=(Private const &);
  public:
        ///
        Private(Paragraph * owner, Layout const & layout);


Reply via email to