class template member functions

From: Irish4Arm (Irish4Arm_at_discussions.microsoft.com)
Date: 07/09/04


Date: Fri, 9 Jul 2004 10:21:02 -0700

Hello...
(I'm new at using templates.)
Receiving a compile error, C2664:.....:cannot convert parameter x from 'T' to 'T'.
Here's the basic layout of the class and the member functions involved:
template< class T > class MyClass
{
  public:
            void F1( T );
  private:
            void F2( T );
};

template< class T > void MyClass<T>::F1( T x )
{
            F2( x ); // getting C2664 error here
}

template< class T > void MyClass<T>::F2( T y )
{
}



Relevant Pages

  • Re: Problem with basic templates on GCC
    ... > member functions and no their definitions. ... > classes definions of all members must be visible ... nothing related to templates seems to be compiling correctly ...
    (comp.lang.cpp)
  • Re: partial specialization
    ... templates: member functions can be overloaded, ... way to uniquely specify which overload you are specializing: ...
    (microsoft.public.vc.language)
  • Re: Compile Error in Module Main
    ... When I get the error the actual message is "Compile error in hidden module: ... Debug and take a look at the macro causing the error. ... What is happening is that there is a series of Word Templates that contain ...
    (microsoft.public.word.application.errors)
  • Re: Open Office ? Labels
    ... it's much easier if someone has done the basic layout already. ... The thing I like about OO is that the templates can easily be ... I used to use Avery labels quite a lot ... Backup site ...
    (uk.people.silversurfers)
  • Re: VBA written in Word 2000 problems in XP
    ... When templates are moved to another computer, you have to make sure that all ... "Suzette" wrote in message ... > "compile error for hidden module". ...
    (microsoft.public.office.developer.vba)