public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/36461]  New: [C++-0X] Exception throws don't use rvalue reference constructors
@ 2008-06-07 20:19 s_gccbugzilla at nedprod dot com
  2008-06-08 17:08 ` [Bug c++/36461] [c++0x] " s_gccbugzilla at nedprod dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: s_gccbugzilla at nedprod dot com @ 2008-06-07 20:19 UTC (permalink / raw)
  To: gcc-bugs

I will firstly admit that I don't know if exception throws /should/ use rvalue
reference constructors - the proposed working at
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2118.html doesn't
mention it, but one certainly would have thought it would.

In my project I have a destructively copied exception class. Currently, the
standard copy constructor simply moves a pointer to an internal state object
which contains a large amount of debug data eg; stack backtraces. Without this
the debug build can be very slow and stack usage dangerous (there is a bug in
MSVC where copy construction of an exception during a throw doesn't release
previous copies which causes quick exhaustion of the stack).

I have tried to add an rvalue reference constructor under the idea that with
-std=c++0x it would implement move semantics more legally than at current.
Unfortunately, g++ really wants to use the copy constructor for a thrown
exception and won't accept a rvalue copy constructor.

Is this intentional?


-- 
           Summary: [C++-0X] Exception throws don't use rvalue reference
                    constructors
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: s_gccbugzilla at nedprod dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36461


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

end of thread, other threads:[~2008-09-24 20:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-07 20:19 [Bug c++/36461] New: [C++-0X] Exception throws don't use rvalue reference constructors s_gccbugzilla at nedprod dot com
2008-06-08 17:08 ` [Bug c++/36461] [c++0x] " s_gccbugzilla at nedprod dot com
2008-06-08 17:19 ` s_gccbugzilla at nedprod dot com
2008-06-08 17:20 ` s_gccbugzilla at nedprod dot com
2008-09-24 20:21 ` dgregor at gcc dot gnu dot org

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).