This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Expected Behavior in Mixing -std=c++0x and default std?


On 8 April 2014 09:06, Hei Chan wrote:
> Hi,
>
> If I have a static library A that builds with default std with another header only library B, and then my program links library A and uses some classes in library B with -std=c++0x.  Will this usage create any issue?
>
> I am running into an issue that one of the member variables in library B (boost ASIO to be precise) has a different memory address (only off by 4 bytes) over time.
>
> Any input is welcome.
>
> Thanks in advance.
>
>
> Cheers,
> Hei
> P.S. I am using GCC 4.6.x on CentOS 6.5.

With GCC 4.6.x, 4.7.2 or 4.8.x that should work OK.  With GCC 4.7.0 or
4.7.1 there would be a problem if B uses std::list.

You should be able to find why the offset of the ASIO type changed, it
might not be due to a std::lib type.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]