Boost logo

Boost Users :

From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2008-06-26 06:32:58


On Thu, Jun 26, 2008 at 9:35 AM, <dariomt_at_[hidden]> wrote:
[...]
>
> About versioning the boost namespace, I suppose you mean something like
> changing boost namespace to e.g. boost_1_35_0. Any thoughts on how much work
> it would take me to patch a given version of boost to do that? Is it even
> possible?
>
What I mean is:

Version 1.34 might have a class A with one field of type int. Version
1.35 might add to the class an additional field. What hapen if 1.34
returns this type's instance to 1.35. And 1.35 will try to access the
additional field...

1.34:
struct A
{
  int i;
};

1.35
struct A
{
  int i;
  double d;
};

A* get_A_from_134()
{
  ...
}

void modify_A_from_134_in_135()
{
   get_A_from_134()->d=10.0; //You write to a memory which does not belong to A
}

This is what I mean. Can crash your soft... Best Thing would be in
this case to not return boost class instances over the lib boundaries
if you know that these rely on different versions.

Best Regards,
Ovanes


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net