From: Akim Demaille Date: Mon, 21 Jul 2008 19:21:04 +0000 (+0200) Subject: Sort methods. X-Git-Tag: v2.7.90~1156 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/006a0303009d132faef2bdac7dd92b0212a09bd2?hp=faef34664a1e4cd7eeaa085e8daaee83d0a85875 Sort methods. * data/lalr1-fusion.cc (destroy): Use as() in its definition. Define it after as(). --- diff --git a/ChangeLog b/ChangeLog index a9be89ff..051dced2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-11-04 Akim Demaille + + Sort methods. + * data/lalr1-fusion.cc (destroy): Use as() in its definition. + Define it after as(). + 2008-11-04 Akim Demaille Useless parens. diff --git a/data/lalr1-fusion.cc b/data/lalr1-fusion.cc index bae0c49e..e3cafff8 100644 --- a/data/lalr1-fusion.cc +++ b/data/lalr1-fusion.cc @@ -186,14 +186,6 @@ dnl FIXME: This is wrong, we want computed header guards. return *new (buffer) T; } - /// Destroy the stored \a T. - template - inline void - destroy() - { - reinterpret_cast(buffer).~T(); - } - /// Accessor to a built \a T. template inline T& @@ -210,6 +202,14 @@ dnl FIXME: This is wrong, we want computed header guards. return reinterpret_cast(buffer); } + /// Destroy the stored \a T. + template + inline void + destroy() + { + as().~T(); + } + /// A buffer large enough to store any of the semantic values. char buffer[S]; };