Bugfix Library: forward initialiser properly into GenNode

...to avoid unnecessary copy.
Especially relevant for initialising a sub-Record from the object builder syntay "MakeRec()"
This commit is contained in:
Fischlurch 2017-10-24 02:44:47 +02:00
parent 5f9b8eb18c
commit 198dcc622a

View file

@ -844,7 +844,7 @@ namespace diff{
inline GenNode
Rec::buildAttribute (string const& key, X&& payload)
{
return GenNode(key, payload);
return GenNode(key, std::forward<X>(payload));
}