Talk:C++/Templates 1
Vitor 22:17, 14 August 2007 (UTC): You can help improving the lesson by saying what you had difficulty to understand or what you want to see in it.
- Is it possible to come up with an example with a linked list, where the items can be different objects? --HappyCamper 03:21, 15 August 2007 (UTC)
Vitor 08:52, 15 August 2007 (UTC): Yes, thanks for asking. I will do that as soon as I have time. Thanks, HappyCamper. You mean item of different types or a list like std::list?
- List like std::list. Maybe we can have something about the standard template library too? --HappyCamper 16:18, 15 August 2007 (UTC)
- Vitor 16:38, 15 August 2007 (UTC): Will do. There's a topic about the STL in C++ page. Edit: Done.
"you should only define default arguments for templates with more than one type"
editI disagree. This is valid:
template<class T1 = int> class Useless { public: T1 value; }; Useless<> value; /* Valid! */
--Ropez 12:58, 19 December 2007 (UTC)
Indeed, my bad. Fixed already, thanks. Vitor 12:16, 15 March 2008 (UTC)
Not well formed
editYour sample program containing a List implementation is not well formed. Any name starting with _ followed by a capitol letter is reserved for implementations, as in the compiler and its library. Though you can get away with this in practice much of the time, it shouldn't be allowed in instructional material. — Preceding unsigned comment added by 24.18.91.126 (talk • contribs) 22:55, 2 March 2008 (UTC)
Hello, unknown guy. I suppose you missed the part where I said it was an immitation of the standard libraries. Vitor 12:15, 15 March 2008 (UTC)