cpp-common/bt2/field.hpp: use raw value proxy for scalar classes
This patch makes field wrappers behave like value wrappers regarding
raw value access.
Now, the `*` operator of boolean, integer, floating point number, and
string fields return a raw value proxy to access the raw value:
void f(const bt2::UnsignedIntegerField val) {
*val = 23;
std::cout << *val << std::endl;
}
I didn't do it for `bt2::CommonBitArrayField` which is a scalar field,
but it's still an array, so it felt weird. Instead, use valueAsInteger()
or bitValue() depending on your use case.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I3bbcdc79a6dea781f720b7da8e18aea285d792b5
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11371
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
This page took 0.027485 seconds and 4 git commands to generate.