cpp-common/bt2/value.hpp: add proxy methods to `bt2::CommonValue`
Those new methods on `bt2::CommonValue` call the corresponding method
while "converting" the current object to another type for the user.
For example:
void f(const bt2::Value val)
{
// We know it's a string value
val = "mireille";
}
This is just sugar for common value operations to avoid the redundancy
of calling as*().
The as*() methods already have BT_ASSERT_DBG() lines to make sure that
the conversion is valid.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I475bda3754a984cbd2eca98f5caa14c765ece956
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11241
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
This page took 0.026881 seconds and 4 git commands to generate.