public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/55713] New: std::tuple<ElementType> incorrectly is convertible to "ElementType" when it is an empty class
@ 2012-12-16 16:46 schaub.johannes at googlemail dot com
  2012-12-16 17:49 ` [Bug libstdc++/55713] " pinskia at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: schaub.johannes at googlemail dot com @ 2012-12-16 16:46 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55713
           Summary: std::tuple<ElementType> incorrectly is convertible to
                    "ElementType" when it is an empty class
    Classification: Unclassified
           Product: gcc
           Version: 4.7.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: schaub.johannes@googlemail.com


This code cannot be compiled with libstdc++

struct A {};
void f(A);

struct B { B(std::tuple<A>); };
void f(B);

int main() {
  f(std::make_tuple(A()));
}

GCC shouts

  "error: 'A' is an inaccessible base of 'tuple<A>'"

Libstdc++ should not make "std::tuple<EmptyClass>" derive from the empty class
directly.


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

end of thread, other threads:[~2021-12-22 18:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-16 16:46 [Bug libstdc++/55713] New: std::tuple<ElementType> incorrectly is convertible to "ElementType" when it is an empty class schaub.johannes at googlemail dot com
2012-12-16 17:49 ` [Bug libstdc++/55713] " pinskia at gcc dot gnu.org
2012-12-16 17:52 ` schaub.johannes at googlemail dot com
2012-12-16 20:40 ` redi at gcc dot gnu.org
2012-12-16 22:48 ` glisse at gcc dot gnu.org
2020-03-19 12:38 ` redi at gcc dot gnu.org
2020-08-07 17:33 ` redi at gcc dot gnu.org
2020-08-17 14:29 ` cvs-commit at gcc dot gnu.org
2020-08-17 14:31 ` redi at gcc dot gnu.org
2021-12-22 18:29 ` jason 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).