locale_classes.h (locale::facet): Delete copy operations in C++11 mode.
authorJonathan Wakely <jwakely@redhat.com>
Fri, 1 May 2015 16:50:31 +0000 (17:50 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 1 May 2015 16:50:31 +0000 (17:50 +0100)
* include/bits/locale_classes.h (locale::facet): Delete copy
operations in C++11 mode.

From-SVN: r222694

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/locale_classes.h

index cb60e3416ad77402a187d6775538d980f258aed6..540413c47b43db5b434743b7e37610da1d4d0877 100644 (file)
@@ -1,5 +1,8 @@
 2015-05-01  Jonathan Wakely  <jwakely@redhat.com>
 
+       * include/bits/locale_classes.h (locale::facet): Delete copy
+       operations in C++11 mode.
+
        * include/bits/alloc_traits.h (__alloc_rebind): Change parameter name.
 
        * acinclude.m4 (GLIBCXX_ENABLE_FILESYSTEM_TS): Disable for solaris.
index f3898ebf7b2ef40c4da245a3e46dca11eb18eec1..7e098e3d128fb3b997204b5eb692e2de139f3e11 100644 (file)
@@ -428,6 +428,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     _GLIBCXX_CONST static const char*
     _S_get_c_name() throw();
 
+#if __cplusplus < 201103L
+  private:
+    facet(const facet&);  // Not defined.
+
+    facet&
+    operator=(const facet&);  // Not defined.
+#else
+    facet(const facet&) = delete;
+
+    facet&
+    operator=(const facet&) = delete;
+#endif
+
   private:
     void
     _M_add_reference() const throw()
@@ -448,11 +461,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        }
     }
 
-    facet(const facet&);  // Not defined.
-
-    facet&
-    operator=(const facet&);  // Not defined.
-
     class __shim;
 
     const facet* _M_sso_shim(const id*) const;