Joel de Guzman schrieb:
On 11/6/2010 7:56 AM, Christopher Schmidt wrote: [snip]
I think gcc is correct. There are two distinct instances of X in B, and those may not have the same address. That's why there is that 4 byte displacement. It is pretty much the same in Fusion. All inbuilt sequences and the vector data storage share a common base class - fusion::sequence_root - that's where the 4 resp. 8 bytes come from.
Good analysis, Christopher. We should do something about this. sequence_root is only there for easy tag detection. There should be better way.
I committed a preliminary fix to the trunk. See
https://svn.boost.org/trac/boost/changeset/66411
for more details. It does not break Fusion and Proto on gcc 4.5.1
-std=c++0x, gcc 4.5.1, msvc 10, msvc 9 and gcc 3.4.2 .
I removed fusion::sequence_root and added an implicit conversion
operator to fusion::sequence_base .
https://svn.boost.org/trac/boost/browser/trunk/boost/fusion/support/sequence...
Instead of using boost::is_base_of