This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/45011] New: template function specialization: does not respect access specifier
- From: "eisenstatdavid+gcc at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Jul 2010 21:51:25 -0000
- Subject: [Bug c++/45011] New: template function specialization: does not respect access specifier
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
$ /ltmp/bin/g++ -v
Using built-in specs.
COLLECT_GCC=/ltmp/bin/g++
COLLECT_LTO_WRAPPER=/ltmp/libexec/gcc/i686-pc-linux-gnu/4.6.0/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ./configure --prefix=/ltmp --with-gimp=/ltmp --with-mpfr=/ltmp
--with-mpc=/ltmp
Thread model: posix
gcc version 4.6.0 20100720 (experimental) (GCC)
$ /ltmp/bin/g++ -save-temps test.cc
$ cat test.ii
# 1 "test.cc"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "test.cc"
class C {
private:
typedef int Private;
};
template<typename T> void function(typename T::Private);
template<> void function<C>(int parameter) {
}
int main() {
function<C>(0);
}
$
--
Summary: template function specialization: does not respect
access specifier
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: eisenstatdavid+gcc at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45011