This is the mail archive of the gcc-patches@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]

Re: [C++ PATCH, committed] Fix PR9030 (main trunk version)


Wolfgang Bangerth <bangerth@ticam.utexas.edu> writes:

| > >> -------------------------------
| > >> class O {
| > >>    struct I { I (int); };
| > >>
| > >>    template <class T_>
| > >>    friend typename O::I f ();;
| > >> };
| > >>
| > >> template <class T_>
| > >> typename O::I f () { return 1; };
| > >>
| > >> struct X {
| > >>    void g() { f<int>(); }
| > >> };
| > >> -------------------------------
| > 
| > Here, there is no TEAMPLATE_INFO because O is not a template class.
| 
| But we use the typename keyword (erroneously), and the error message is 
| profoundly unhelpful.

Hmm.  Can you explain to me the erronous use of typename here?

-- Gaby


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