Problem using Loki templates in template class

L

Lars Ribe

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top