public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [v3] delete copy ctor and assignment in locale::facet, locale::id
@ 2008-09-29 14:31 Chris Fairles
  2008-09-29 15:00 ` Paolo Carlini
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Fairles @ 2008-09-29 14:31 UTC (permalink / raw)
  To: Gcc Patch List, libstdc++

[-- Attachment #1: Type: text/plain, Size: 36 bytes --]

tested x86_64, ok for trunk?

Chris

[-- Attachment #2: Changelog_locale_facet_id.txt --]
[-- Type: text/plain, Size: 190 bytes --]

2008-09-29  Chris Fairles <cfairles@gcc.gnu.org>

        * include/bits/locale_classes.h (locale::facet): Delete copy ctor and
        assignment operator.
        (locale::id): Likewise.


[-- Attachment #3: locale_facet_id.patch.txt --]
[-- Type: text/plain, Size: 1214 bytes --]

Index: include/bits/locale_classes.h
===================================================================
--- include/bits/locale_classes.h	(revision 140752)
+++ include/bits/locale_classes.h	(working copy)
@@ -376,6 +376,11 @@
     virtual
     ~facet();
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+    facet(const facet&) = delete;
+    void operator=(const facet&) = delete;
+#endif
+
     static void
     _S_create_c_locale(__c_locale& __cloc, const char* __s,
 		       __c_locale __old = 0);
@@ -411,10 +416,12 @@
 	}
     }
 
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
     facet(const facet&);  // Not defined.
 
     facet&
     operator=(const facet&);  // Not defined.
+#endif
   };
 
 
@@ -450,10 +457,12 @@
     // Last id number assigned.
     static _Atomic_word		_S_refcount;
 
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
     void
     operator=(const id&);  // Not defined.
 
     id(const id&);  // Not defined.
+#endif
 
   public:
     // NB: This class is always a static data member, and thus can be
@@ -461,6 +470,11 @@
     /// Constructor.
     id() { }
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+    id(const id&) = delete;
+    void operator=(const id&) = delete;
+#endif
+
     size_t
     _M_id() const;
   };

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [v3] delete copy ctor and assignment in locale::facet, locale::id
  2008-09-29 14:31 [v3] delete copy ctor and assignment in locale::facet, locale::id Chris Fairles
@ 2008-09-29 15:00 ` Paolo Carlini
  2008-09-29 15:29   ` Chris Fairles
  0 siblings, 1 reply; 4+ messages in thread
From: Paolo Carlini @ 2008-09-29 15:00 UTC (permalink / raw)
  To: Chris Fairles; +Cc: Gcc Patch List, libstdc++

Chris Fairles wrote:
> tested x86_64, ok for trunk?
>   
Bah, frankly I don't think we are going to gain much from this kind of
change: remember that we are talking about the C++0x *experimental*
mode, not about the eventual C++1x, ABI-breaking, library. In general we
want to early implement new features, in particular when self-contained
in new headers. In general, at this stage, it doesn't make much sense to
get right small details in existing facilities...

Paolo.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [v3] delete copy ctor and assignment in locale::facet, locale::id
  2008-09-29 15:00 ` Paolo Carlini
@ 2008-09-29 15:29   ` Chris Fairles
  2008-09-29 15:38     ` Paolo Carlini
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Fairles @ 2008-09-29 15:29 UTC (permalink / raw)
  To: Paolo Carlini; +Cc: Gcc Patch List, libstdc++

On Mon, Sep 29, 2008 at 8:56 AM, Paolo Carlini <paolo.carlini@oracle.com> wrote:
> Chris Fairles wrote:
>> tested x86_64, ok for trunk?
>>
> Bah, frankly I don't think we are going to gain much from this kind of
> change: remember that we are talking about the C++0x *experimental*
> mode, not about the eventual C++1x, ABI-breaking, library. In general we
> want to early implement new features, in particular when self-contained
> in new headers. In general, at this stage, it doesn't make much sense to
> get right small details in existing facilities...
>
> Paolo.
>

Agreed. Just something I had sitting in my local copy from quite a
while ago when I was going through the std looking for deleted
copy/assign changes. I hadn't submitted it for basically the reasons
you described.

Chris

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [v3] delete copy ctor and assignment in locale::facet, locale::id
  2008-09-29 15:29   ` Chris Fairles
@ 2008-09-29 15:38     ` Paolo Carlini
  0 siblings, 0 replies; 4+ messages in thread
From: Paolo Carlini @ 2008-09-29 15:38 UTC (permalink / raw)
  To: Chris Fairles; +Cc: Gcc Patch List, libstdc++

Chris Fairles wrote:
> Agreed. Just something I had sitting in my local copy from quite a
> while ago when I was going through the std looking for deleted
> copy/assign changes. I hadn't submitted it for basically the reasons
> you described.
>   
Excellent. Don't delete the patchlet, will be useful, at some point ;)

Paolo.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-09-29 13:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-29 14:31 [v3] delete copy ctor and assignment in locale::facet, locale::id Chris Fairles
2008-09-29 15:00 ` Paolo Carlini
2008-09-29 15:29   ` Chris Fairles
2008-09-29 15:38     ` Paolo Carlini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).