mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
Sort methods.
* data/lalr1-fusion.cc (destroy): Use as() in its definition. Define it after as().
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2008-11-04 Akim Demaille <demaille@gostai.com>
|
||||||
|
|
||||||
|
Sort methods.
|
||||||
|
* data/lalr1-fusion.cc (destroy): Use as() in its definition.
|
||||||
|
Define it after as().
|
||||||
|
|
||||||
2008-11-04 Akim Demaille <demaille@gostai.com>
|
2008-11-04 Akim Demaille <demaille@gostai.com>
|
||||||
|
|
||||||
Useless parens.
|
Useless parens.
|
||||||
|
|||||||
@@ -186,14 +186,6 @@ dnl FIXME: This is wrong, we want computed header guards.
|
|||||||
return *new (buffer) T;
|
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.
|
/// Accessor to a built \a T.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inline T&
|
inline T&
|
||||||
@@ -210,6 +202,14 @@ dnl FIXME: This is wrong, we want computed header guards.
|
|||||||
return reinterpret_cast<const T&>(buffer);
|
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.
|
/// A buffer large enough to store any of the semantic values.
|
||||||
char buffer[S];
|
char buffer[S];
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user