Sort methods.

* data/lalr1-fusion.cc (destroy): Use as() in its definition.
	Define it after as().
This commit is contained in:
Akim Demaille
2008-07-21 21:21:04 +02:00
parent faef34664a
commit 006a030300
2 changed files with 14 additions and 8 deletions

View File

@@ -186,14 +186,6 @@ dnl FIXME: This is wrong, we want computed header guards.
return *new (buffer) T;
}
/// Destroy the stored \a T.
template <typename T>
inline void
destroy()
{
reinterpret_cast<T&>(buffer).~T();
}
/// Accessor to a built \a T.
template <typename T>
inline T&
@@ -210,6 +202,14 @@ dnl FIXME: This is wrong, we want computed header guards.
return reinterpret_cast<const T&>(buffer);
}
/// Destroy the stored \a T.
template <typename T>
inline void
destroy()
{
as<T>().~T();
}
/// A buffer large enough to store any of the semantic values.
char buffer[S];
};