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
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