Let yy::variant::build return an lvalue.

* data/lalr1-fusion.cc (variant::build): Return a reference to the
	object.
This commit is contained in:
Akim Demaille
2008-07-18 18:37:40 +02:00
parent 83243c24ba
commit 8b9c89fb65
2 changed files with 8 additions and 2 deletions

View File

@@ -167,10 +167,10 @@ dnl FIXME: This is wrong, we want computed header guards.
{
/// Instantiate a \a T in here.
template <typename T>
inline void
inline T&
build()
{
new (buffer) T;
return *new (buffer) T;
}
/// Destroy the stored \a T.