cpp-common/bt2: use universal reference for `Graph::addComponent()` initialization data
I noticed it was not possible to pass data to `Graph::addComponent`
using a temporary object:
graph->addComponent(*srcCompCls, "source-1", TestSourceData {});
My understanding of it is that the compiler does not consider the
overload with the `InitDataT&` parameter for this, because the temporary
object can't bind to the lvalue reference.
Change these methods to take forwarding references instead.
Change-Id: Icc80239812c325b777ed83e8634302a0c9d72f14
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12049
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
This page took 0.025616 seconds and 4 git commands to generate.