public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/49399] New: [C++0x] substitution failure error
@ 2011-06-14  7:12 jarrydb at cse dot unsw.edu.au
  2011-06-14  8:15 ` [Bug c++/49399] " redi at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: jarrydb at cse dot unsw.edu.au @ 2011-06-14  7:12 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [C++0x] substitution failure error
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jarrydb@cse.unsw.edu.au


Created attachment 24515
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24515
substitution failure

When accessing a private member of a class in a substitution failure is not an
error sort of way, the compiler reports an error.

Compiling the attached code gives the following:

g++ --std=c++0x value_type.cpp
value_type.cpp: In function ‘int broken_fun(int, typename T::value_type*) [with
T = broken, typename T::value_type = int]’:
value_type.cpp:4:15: error: ‘typedef int broken::value_type’ is private
value_type.cpp:14:37: error: within this context

It works fine without c++0x mode, and on previous versions of gcc.

output of gcc -v

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/home/jarryd/local/gcc-4.7/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /home/jarryd/installers/gcc-svn/configure
--prefix=/home/jarryd/local/gcc-4.7 --disable-multilib
--enable-languages=c,c++,go
Thread model: posix
gcc version 4.7.0 20110614 (experimental) (GCC)


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

end of thread, other threads:[~2011-06-15 16:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-14  7:12 [Bug c++/49399] New: [C++0x] substitution failure error jarrydb at cse dot unsw.edu.au
2011-06-14  8:15 ` [Bug c++/49399] " redi at gcc dot gnu.org
2011-06-14 11:53 ` jarrydb at cse dot unsw.edu.au
2011-06-14 12:11 ` redi at gcc dot gnu.org
2011-06-14 12:22 ` jarrydb at cse dot unsw.edu.au
2011-06-14 12:28 ` redi at gcc dot gnu.org
2011-06-14 12:31 ` redi at gcc dot gnu.org
2011-06-14 12:34 ` jarrydb at cse dot unsw.edu.au
2011-06-14 12:35 ` jarrydb at cse dot unsw.edu.au
2011-06-14 12:41 ` redi at gcc dot gnu.org
2011-06-15 16:47 ` 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).