virtual templated functions?

Gabriel Dos Reis gdr@codesourcery.com
Sun Jun 11 19:50:00 GMT 2000


Tom Lien <lient@mrs.umn.edu> writes:

| I am trying to do something like this:
| 
| class Item {
| 
|   template<class target_iter>
|   virtual void use(target_iter begin, target_iter end) = 0;
| 
| };
| 
| g++ says that this is an invalid use of 'virtual' in template declaration.
| Is this a language limitation? Is it just not implemented yet? If this
| is an impossible feature is there a workaround or alternative that could
| serve my needs as well?

There is no such thing as a virtual template member function. Please,
consider asking on C++ specific forums. This list is for GCC
development.

Regards,

-- Gaby
CodeSourcery, LLC                             http://www.codesourcery.com


More information about the Gcc mailing list