ABI backward compatibility

Discussion in 'C++' started by =?iso-8859-1?q?Ernesto_Basc=F3n?=, Oct 31, 2006.

  1. Hi:

    I've read some about the pimpl idiom and I know that it provides safe
    ABI backward compatibility on shared libraries.

    Let's consider the following definitions:

    template <class T>
    class A
    {
    public:
    A()
    {
    }

    virtual ~A()
    {
    }

    T GetValue() const
    {
    return mValue;
    }

    private:
    T mValue;
    };


    class B
    {
    public:
    B(const A<int>& aA)
    {
    mValue = aA.GetValue();
    }

    private:
    int mValue;
    };


    How can I provide ABI compatibility in this case, considering that I
    cannot use the pimpl idiom in my template class implementation?

    Thanks in advance,


    Ernesto
     
    =?iso-8859-1?q?Ernesto_Basc=F3n?=, Oct 31, 2006
    #1
    1. Advertisements

  2. Please heeeeelp!!!!!



    Ernesto Bascón ha escrito:
     
    =?iso-8859-1?q?Ernesto_Basc=F3n?=, Nov 1, 2006
    #2
    1. Advertisements

  3. Is there anybody out there?

    :)
     
    =?iso-8859-1?q?Ernesto_Basc=F3n?=, Nov 2, 2006
    #3
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.