Add bt2::Common{Field,FieldClass,Value,Message}<>::as<>()
Those new as() method templates conceptually cast their object to the
first template parameter. Those are shorthands to use specific types
within a template function, for example:
template <typename FieldT, typename ValT>
void g(bt2::Field field, const ValT val)
{
// ...
field.as<FieldT>() = val;
// ...
}
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: Ifc1f49487ac6ef9c143bf4c2faa3373f4eaccd9e
Reviewed-on: https://review.lttng.org/c/babeltrace/+/8099
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/10803
Tested-by: jenkins <jenkins@lttng.org>
This page took 0.025363 seconds and 4 git commands to generate.