This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/9549: g++ fails to call member template from template class


>Number:         9549
>Category:       c++
>Synopsis:       g++ fails to call member template from template class
>Confidential:   no
>Severity:       critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 03 18:16:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Alexander Bürger
>Release:        3.2.2 20030131 (Debian prerelease) (Debian testing/unstable)
>Organization:
>Environment:
System: Linux feynman 2.4.20 #3 Sam Jan 4 17:10:36 CET 2003 i686 unknown unknown GNU/Linux
Architecture: i686

	
host: i386-pc-linux-gnu
build: i386-pc-linux-gnu
target: i386-pc-linux-gnu
configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,pascal,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --disable-__cxa_atexit --enable-java-gc=boehm --enable-objc-gc i386-linux
>Description:
	g++ fails to compile the code; complains about syntax error
>How-To-Repeat:
	compile the example code:
	------------------------

struct maxi {
    template<class T>
    void do_it() { }
};

template<class T>
struct mini {
    void do_something( maxi& m )
        { m.do_it<T>(); } /* ERROR: syntax error before `;' token */
};

int main()
{
  maxi ma;
  mini<int> mi;
  mi.do_something( ma );
  return 0;
}
	------------------------
>Fix:
	no generally applicable work-around or fix known

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]