cpp-common/bt2: use more specific static assertion messages
The current
`LibObjT` must NOT be `const`.
static assertion message is pretty generic. For a typical
`bt2::ConstXyz` user, `LibObjT` actually means nothing, because she's
not using `bt2::CommonXyz` directly, only an alias.
Make the message specific, for example:
Not available with `bt2::ConstBoolValue`.
For example, with:
void lel(bt2::ConstBoolValue val)
{
val = false;
}
I get:
cpp-common/bt2/value.hpp: In instantiation of ‘bt2::CommonBoolValue<LibObjT>& bt2::CommonBoolValue<LibObjT>::operator=(Value) const [with LibObjT = const bt_value; Value = bool]’:
test.cpp:61:11: required from here
cpp-common/bt2/value.hpp:349:48: error: static assertion failed: Not available with `bt2::ConstBoolValue`.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I4e96d4dcd1cc345d8b393aea6bb78fbc0000e9ba
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11361
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
This page took 0.034263 seconds and 4 git commands to generate.