
17 Nov
2011
17 Nov
'11
5:42 p.m.
乔志强
MS Visual Studio 2010 SP1 compiled OK.
But if use gcc, boost::variant<T> use boost:: sizeof_<T> and boost:: alignment_of <T>, and use sizeof(T), so need a complete type. Maybe gcc bug or bug of boost for gcc ? So you need workaround between // ADD THESE begin //////////// and // ADD THESE end ////////////, see next:
Thanks for the help! I was using gcc 4.6. I wonder why gcc performs differently to MSVC? The fix was simple enough - thanks very much. Jerry