public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53102] New: Misplaced 'typename' gives access to private type
@ 2012-04-24 11:08 kristian.spangsege at gmail dot com
  2012-04-24 11:27 ` [Bug c++/53102] " redi at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: kristian.spangsege at gmail dot com @ 2012-04-24 11:08 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53102
           Summary: Misplaced 'typename' gives access to private type
    Classification: Unclassified
           Product: gcc
           Version: 4.6.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: kristian.spangsege@gmail.com


Here 'typename' is used outside a template, in which case it apparently
invalidly gives access to A::type.


class A {
private:
  typedef int type;
};

class B {
public:
  typedef typename A::type type;
};


int main()
{
  B::type v = 8;
  return v;
}


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

end of thread, other threads:[~2020-03-12 18:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-24 11:08 [Bug c++/53102] New: Misplaced 'typename' gives access to private type kristian.spangsege at gmail dot com
2012-04-24 11:27 ` [Bug c++/53102] " redi at gcc dot gnu.org
2012-04-24 16:19 ` pinskia at gcc dot gnu.org
2020-03-12 18:27 ` [Bug c++/53102] typename " mpolacek 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).