cpp-common/bt2c: add CStringView equality and non-equality operators
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 15 Jan 2024 21:25:29 +0000 (16:25 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 29 Jan 2024 16:38:19 +0000 (11:38 -0500)
commit821af09916878cc088b71e380980a75dc1017e10
treeeee8ee46e566b2b82d741614a29f76e6c847f2b0
parent05f7d581bee6323522f6b9c9843f87d3d8bff070
cpp-common/bt2c: add CStringView equality and non-equality operators

Add `operator==` and `operator!=` functions to check equality or
non-equality between `CStringView` and another `CStringView`,
`const char *` and `std::string`.

Add a test to exercise those.

Change-Id: I2463966aae50792bb3e21ae65f9f124b08114499
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11681
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
src/cpp-common/bt2c/c-string-view.hpp
tests/Makefile.am
tests/cpp-common/test-c-string-view.cpp [new file with mode: 0644]
This page took 0.024722 seconds and 4 git commands to generate.