public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/60921] New: 'final' allocators are incompatible with the Empty Base-class Optimisation
@ 2014-04-22 14:35 redi at gcc dot gnu.org
  2014-04-22 14:36 ` [Bug libstdc++/60921] " redi at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2014-04-22 14:35 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60921
           Summary: 'final' allocators are incompatible with the Empty
                    Base-class Optimisation
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
        Depends on: 51365

+++ This bug was initially created as a clone of Bug #51365 +++

Deriving from allocators to use the EBO doesn't work if they are final:

#include <future>
#include <memory>

template<typename T>
struct final_allocator final : std::allocator<T>
{
  final_allocator() = default;

  template<typename U>
    final_allocator(const final_allocator<U>&) { }

  template<typename U>
    struct rebind { typedef final_allocator<U> other; };
};

final_allocator<int> a;

std::promise<int> p(std::allocator_arg, a);

This affects the containers and most types in <future>. See Bug 51365 comment 6
for a partial fix.


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

* [Bug libstdc++/60921] 'final' allocators are incompatible with the Empty Base-class Optimisation
  2014-04-22 14:35 [Bug libstdc++/60921] New: 'final' allocators are incompatible with the Empty Base-class Optimisation redi at gcc dot gnu.org
@ 2014-04-22 14:36 ` redi at gcc dot gnu.org
  2014-04-25 15:00 ` redi at gcc dot gnu.org
  2021-04-19 10:40 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2014-04-22 14:36 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60921
Bug 60921 depends on bug 51365, which changed state.

Bug 51365 Summary: cannot use final empty class in std::tuple
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51365

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED


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

* [Bug libstdc++/60921] 'final' allocators are incompatible with the Empty Base-class Optimisation
  2014-04-22 14:35 [Bug libstdc++/60921] New: 'final' allocators are incompatible with the Empty Base-class Optimisation redi at gcc dot gnu.org
  2014-04-22 14:36 ` [Bug libstdc++/60921] " redi at gcc dot gnu.org
@ 2014-04-25 15:00 ` redi at gcc dot gnu.org
  2021-04-19 10:40 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2014-04-25 15:00 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2014-04-25
           Assignee|unassigned at gcc dot gnu.org      |redi at gcc dot gnu.org
     Ever confirmed|0                           |1


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

* [Bug libstdc++/60921] 'final' allocators are incompatible with the Empty Base-class Optimisation
  2014-04-22 14:35 [Bug libstdc++/60921] New: 'final' allocators are incompatible with the Empty Base-class Optimisation redi at gcc dot gnu.org
  2014-04-22 14:36 ` [Bug libstdc++/60921] " redi at gcc dot gnu.org
  2014-04-25 15:00 ` redi at gcc dot gnu.org
@ 2021-04-19 10:40 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2021-04-19 10:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60921

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|redi at gcc dot gnu.org            |unassigned at gcc dot gnu.org
             Status|ASSIGNED                    |NEW

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

end of thread, other threads:[~2021-04-19 10:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-22 14:35 [Bug libstdc++/60921] New: 'final' allocators are incompatible with the Empty Base-class Optimisation redi at gcc dot gnu.org
2014-04-22 14:36 ` [Bug libstdc++/60921] " redi at gcc dot gnu.org
2014-04-25 15:00 ` redi at gcc dot gnu.org
2021-04-19 10:40 ` redi at gcc dot gnu.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).