This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49399] New: [C++0x] substitution failure error
- From: "jarrydb at cse dot unsw.edu.au" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 14 Jun 2011 07:12:06 +0000
- Subject: [Bug c++/49399] New: [C++0x] substitution failure error
- Auto-submitted: auto-generated
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)