Template specialization of a method

Oldtimer
Posts: 832
Joined: 2002.09
Post: #1
I have a templatized base class, and I want to specialize one of its methods (to control its return type). That means I define the class, let's say, as template <typename T> A. Now, all of its member functions need to be:
Code:
template <typename T> A<T>::MyFunc
Surely that can't be necessary? Isn't there a better way to specialize just one of the methods? Do I need to typedef it in some way?
Quote this message in a reply
Post Reply 


Messages In This Thread
Template specialization of a method - Fenris - Jul 10, 2005 06:49 AM
Template specialization of a method - Fenris - Jul 11, 2005, 12:22 AM
Template specialization of a method - Fenris - Jul 11, 2005, 05:17 AM
Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Trouble With Template Classes in C++ Nick 4 2,839 Nov 21, 2006 10:25 AM
Last Post: DoG
  Trouble with template classes ermitgilsukaru 2 2,338 Aug 11, 2006 02:00 PM
Last Post: ermitgilsukaru