Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Problem using Loki templates in template class

Reply
Thread Tools

Problem using Loki templates in template class

 
 
Lars Ribe
Guest
Posts: n/a
 
      04-08-2008
Hi all C++'ers
I try to use the Loki::SmartPtr as a member variable type in a
templatized class, but Borland C++ compiler keeps giving me errors.
I use the "old" Loki from the book as this one had a Borland-specific
version; the newest versions gives a LOT of errors in Borland.
I *do* realize that this issue may be Borland-specific or that only a
minor fraction of you have ever tried the Loki library; in that case I
do apologize in advance. However, if this is more of a general C++-
issue, you might be able to give me some relevant answers.

This code gives the error:
using namespace Loki;
template<class T>
class Test {
public:
SmartPtr<T> my_var;
}

int main(int argc, char* argv[])
{
Test<double> a;
}

With this code, I get a compiler error:

"Type mismatch in redeclaration of GetImpl(const class &)" .

GetImpl is a function declared as a friend inside one of the
templates.

If anyone have a clue, please let me know.

Regards,

Lars Ribe

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying a template class into another template class object with different no of templates erictham115@gmail.com C++ 1 02-21-2007 05:58 AM
how to Specializations of function Templates or Overloading Function templates with Templates ? recover C++ 2 07-25-2006 02:55 AM
A parameterized class (i.e. template class / class template) is not a class? christopher diggins C++ 16 05-04-2005 12:26 AM
Templates templates templates JKop C++ 3 07-21-2004 11:44 AM
Loki::Factory and Loki::TList Sebastian Faust C++ 0 10-30-2003 12:20 PM



Advertisments