Au cas où voilà ce que le compilo me jette:
/usr/include/g++-3/stl_iterator.h: In instantiation of `iterator_traits<int>':
/usr/include/g++-3/stl_iterator.h:574: instantiated from `reverse_iterator<int>'
test.cpp:10: instantiated from `A<int>'
test.cpp:25: instantiated from here
/usr/include/g++-3/stl_iterator.h:102: `int' is not a class, struct, or union type
/usr/include/g++-3/stl_iterator.h:103: `int' is not a class, struct, or union type
/usr/include/g++-3/stl_iterator.h:104: `int' is not a class, struct, or union type
/usr/include/g++-3/stl_iterator.h:105: `int' is not a class, struct, or union type
/usr/include/g++-3/stl_iterator.h:106: `int' is not a class, struct, or union type
/usr/include/g++-3/stl_iterator.h: In instantiation of `reverse_iterator<int>':
test.cpp:10: instantiated from `A<int>'
test.cpp:25: instantiated from here
/usr/include/g++-3/stl_iterator.h:574: no type named `iterator_category' in `struct iterator_traits<int>'
/usr/include/g++-3/stl_iterator.h:576: no type named `value_type' in `struct iterator_traits<int>'
/usr/include/g++-3/stl_iterator.h:578: no type named `difference_type' in `struct iterator_traits<int>'
/usr/include/g++-3/stl_iterator.h:580: no type named `pointer' in `struct iterator_traits<int>'
/usr/include/g++-3/stl_iterator.h:582: no type named `reference' in `struct iterator_traits<int>'
/usr/include/g++-3/stl_iterator.h:599: no type named `reference' in `struct iterator_traits<int>'
/usr/include/g++-3/stl_iterator.h:604: no type named `pointer' in `struct iterator_traits<int>'
/usr/include/g++-3/stl_iterator.h:626: no type named `difference_type' in `struct iterator_traits<int>'
/usr/include/g++-3/stl_iterator.h:629: no type named `difference_type' in `struct iterator_traits<int>'
/usr/include/g++-3/stl_iterator.h:633: no type named `difference_type' in `struct iterator_traits<int>'
/usr/include/g++-3/stl_iterator.h:636: no type named `difference_type' in `struct iterator_traits<int>'
/usr/include/g++-3/stl_iterator.h:640: no type named `reference' in `struct iterator_traits<int>'
Je ne comprends pas pourquoi j'aides erreurs de la STL. Rien de suffisamment clair sur ce que j'ai codé.
Et si je remplace A<int> par A<string> ça donne:
/usr/include/g++-3/stl_iterator.h: In instantiation of `iterator_traits<string>':
/usr/include/g++-3/stl_iterator.h:574: instantiated from `reverse_iterator<string>'
test.cpp:11: instantiated from `A<string>'
test.cpp:26: instantiated from here
/usr/include/g++-3/stl_iterator.h:102: no type named `iterator_category' in `class string'
/usr/include/g++-3/stl_iterator.h: In instantiation of `reverse_iterator<string>':
test.cpp:11: instantiated from `A<string>'
test.cpp:26: instantiated from here
/usr/include/g++-3/stl_iterator.h:574: no type named `iterator_category' in `struct iterator_traits<string>'
[edtdd]--Message édité par Krueger--[/edtdd]
---------------
"Colère et intolérance sont les ennemis d'une bonne compréhension." Gandhi