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

  2. Please heeeeelp!!!!!



    Ernesto Bascón ha escrito:

    > 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?=, Nov 1, 2006
    #2
    1. Advertising

  3. Is there anybody out there?

    :)

    Ernesto Bascón wrote:
    > Please heeeeelp!!!!!
    >
    >
    >
    > Ernesto Bascón ha escrito:
    >
    > > 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?=, Nov 2, 2006
    #3
    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. =?Utf-8?B?TUxpYmJ5?=

    Netscape - Backward compatibility testing

    =?Utf-8?B?TUxpYmJ5?=, Sep 4, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    646
    [MSFT]
    Sep 6, 2004
  2. Maziar Aflatoun

    ASP 2.0 backward compatibility to 1.0

    Maziar Aflatoun, Apr 12, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    1,612
    Steve C. Orr [MVP, MCSD]
    Apr 13, 2005
  3. Muhammed Syyid

    Maintaining backward compatibility

    Muhammed Syyid, Dec 22, 2003, in forum: Java
    Replies:
    0
    Views:
    390
    Muhammed Syyid
    Dec 22, 2003
  4. Rich
    Replies:
    1
    Views:
    340
    Rhino
    Dec 5, 2004
  5. Griz
    Replies:
    11
    Views:
    942
Loading...

Share This Page