bt2::internal::BorrowedObj: add static assertions for generic copy ops.
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 19 May 2022 16:22:29 +0000 (12:22 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 11 Sep 2023 15:24:02 +0000 (11:24 -0400)
commit462e86286c967092b5c116d9d936cc6f0f7295c1
tree8e63d6856c7c5c53896ece086e8556366991173e
parent5b2d3ebb80029d9f23862ca8e0f1863287d7d04e
bt2::internal::BorrowedObj: add static assertions for generic copy ops.

This patch adds static assertions to `borrowed-obj.hpp` so as to make
compiler errors more readable when assigning a const wrapper to a
non-const wrapper, for example:

    bt2::Value v = bt2::ConstMapValue {somePtr};

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: Ib23d91c6660a478e0ad663abbd141b0a90eaa92d
Reviewed-on: https://review.lttng.org/c/babeltrace/+/8091
Reviewed-on: https://review.lttng.org/c/babeltrace/+/10802
Tested-by: jenkins <jenkins@lttng.org>
src/cpp-common/bt2/internal/borrowed-obj.hpp
This page took 0.024962 seconds and 4 git commands to generate.