ABI backward compatibility

  • Thread starter =?iso-8859-1?q?Ernesto_Basc=F3n?=
  • Start date
?

=?iso-8859-1?q?Ernesto_Basc=F3n?=

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
 

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

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top