cpp-common/bt2: add static_assert in `CommonClockClass::uuid(const std::uint8_t *)`
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 29 Feb 2024 19:58:04 +0000 (14:58 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 26 Mar 2024 18:56:36 +0000 (14:56 -0400)
Change-Id: I66399af51ab21c52e8fbc61cc61cae1b94f1e2e7
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11956
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
src/cpp-common/bt2/clock-class.hpp

index ad033b0e5587b71fa72e8d1f235362f987ae011b..5b80890d2e7deaf936bf64872afa35f54e04cbf8 100644 (file)
@@ -215,6 +215,8 @@ public:
 
     CommonClockClass uuid(const bt2c::UuidView uuid) const noexcept
     {
+        static_assert(!std::is_const<LibObjT>::value, "Not available with `bt2::ConstClockClass`.");
+
         bt_clock_class_set_uuid(this->libObjPtr(), uuid.data());
         return *this;
     }
This page took 0.025062 seconds and 4 git commands to generate.