cpp-common/bt2: add bt2::wrap() overloads
You may now call bt2::wrap() with any libbabeltrace2 object pointer with
which you could build a borrowed object wrapper. Therefore, this
excludes `bt2::MessageArray` which is a special case (ownership is
transferred).
For example:
void f(bt_value * const val)
{
const auto wrappedVal = bt2::wrap(val);
if (wrappedVal.isUnsignedInteger()) {
*wrappedVal = 23;
}
// ...
}
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I49cc7121bb3c85dc49b9682c219940d4cb2aab5d
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11240
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
CI-Build: Simon Marchi <simon.marchi@efficios.com>
This page took 0.025299 seconds and 4 git commands to generate.