Problem using Loki templates in template class

Discussion in 'C++' started by Lars Ribe, Apr 8, 2008.

  1. Lars Ribe

    Lars Ribe Guest

    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
    Lars Ribe, Apr 8, 2008
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sebastian Faust

    Loki::Factory and Loki::TList

    Sebastian Faust, Oct 30, 2003, in forum: C++
    Replies:
    0
    Views:
    684
    Sebastian Faust
    Oct 30, 2003
  2. JKop
    Replies:
    3
    Views:
    468
  3. christopher diggins
    Replies:
    16
    Views:
    749
    Pete Becker
    May 4, 2005
  4. recover
    Replies:
    2
    Views:
    800
    recover
    Jul 25, 2006
  5. Replies:
    1
    Views:
    329
    John Harrison
    Feb 21, 2007
Loading...

Share This Page