From ba148bae42c9c0892823f5dabd9036f9a8378dec Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 9 Jun 2004 12:12:42 +0000 Subject: [PATCH] 64-bit portability fix [SVN r23065] --- include/boost/regex/v4/perl_matcher_non_recursive.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/boost/regex/v4/perl_matcher_non_recursive.hpp b/include/boost/regex/v4/perl_matcher_non_recursive.hpp index a730ae26..893caa66 100644 --- a/include/boost/regex/v4/perl_matcher_non_recursive.hpp +++ b/include/boost/regex/v4/perl_matcher_non_recursive.hpp @@ -38,7 +38,13 @@ inline void inplace_destroy(T* p) struct saved_state { - unsigned int id; + union{ + unsigned int id; + // these ensure that this struct gets the same alignment as derived structs: + void* padding1; + std::size_t padding2; + std::ptrdiff_t padding3; + }; saved_state(unsigned i) : id(i) {} };