cpp-common/bt2c: use `ComparableWithCStringView` on `operator!=` meant for `CStringView`
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 1 Mar 2024 15:42:13 +0000 (10:42 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 26 Mar 2024 18:56:36 +0000 (14:56 -0400)
commitab3bed93f8d6270a24b4a12bd5c19dcf5b0f61c6
treeff45160982c029f8623608fdc413c21933c345e1
parent77160ac2dcf3bcc30b079af4baeffee604e11037
cpp-common/bt2c: use `ComparableWithCStringView` on `operator!=` meant for `CStringView`

I don't recall exactly when I needed this, but it occured to me once
that the `operator!=` we provide for `CStringView` was getting picked up
for some unrelated type.  It just seems dangerous to provide a generic
templated operator like that that can match literally anything.

Use the same `ComparableWithCStringView` conditions here that we use for
`operator==` just above, so that it only gets used for what it was
intended for.

Change-Id: I798f1c8195c541f6188499dcfabfe1233a95a492
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11962
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
src/cpp-common/bt2c/c-string-view.hpp
This page took 0.024824 seconds and 4 git commands to generate.