mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 10:13:03 +00:00
Let yy::variant::build return an lvalue.
* data/lalr1-fusion.cc (variant::build): Return a reference to the object.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2008-11-03 Akim Demaille <demaille@gostai.com>
|
||||||
|
|
||||||
|
Let yy::variant::build return an lvalue.
|
||||||
|
* data/lalr1-fusion.cc (variant::build): Return a reference to the
|
||||||
|
object.
|
||||||
|
|
||||||
2008-11-03 Akim Demaille <demaille@gostai.com>
|
2008-11-03 Akim Demaille <demaille@gostai.com>
|
||||||
|
|
||||||
Define yy::variant only when needed.
|
Define yy::variant only when needed.
|
||||||
|
|||||||
@@ -167,10 +167,10 @@ dnl FIXME: This is wrong, we want computed header guards.
|
|||||||
{
|
{
|
||||||
/// Instantiate a \a T in here.
|
/// Instantiate a \a T in here.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inline void
|
inline T&
|
||||||
build()
|
build()
|
||||||
{
|
{
|
||||||
new (buffer) T;
|
return *new (buffer) T;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Destroy the stored \a T.
|
/// Destroy the stored \a T.
|
||||||
|
|||||||
Reference in New Issue
Block a user