typedef, class template and inheritance
Gabriel Dos Reis
Gabriel.Dos-Reis@dptmaths.ens-cachan.fr
Sat Oct 4 14:36:00 GMT 1997
>>>>> ëJasonû, Jason Merrill <jason@cygnus.com> wrote:
>>>>> Gabriel Dos Reis <Gabriel.Dos-Reis@dptmaths.ens-cachan.fr> writes:
>> So here goes a question: is code listed in Bjarne's book (page 557)
>> illegal? He said his code is pure C++ and get compiled.
Jason> There are a number of mistakes in the examples in C++PL 3, I am told. I
Jason> don't have a copy yet, myself.
Yes, I am aware of that. I have myself sent him, in August, errors I
found in the book. But here I think this is not an error: consider the
definition of struct iterator. What are its purpose? IMHO one purpose
is to enable "definition" of
iterator_traits<UserDefinedIterator>
when needed et whenever a user defines
class UserDefinedIterator : public iterator<UserDefinedClass,...>
as he explained it on page 555. In other words, it enables one to
"import" types in class.
Not enableing types defined public in foo<T, T> to be visible in
bar<T> is not the way things should go.
--Gaby
More information about the Gcc-bugs
mailing list