cpp-common: replace bstd::string_view with nonstd::string_view
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 4 Mar 2024 19:15:59 +0000 (14:15 -0500)
committerMichael Jeanson <mjeanson@efficios.com>
Mon, 4 Mar 2024 22:47:57 +0000 (17:47 -0500)
commita19a1879a2d960421d8d372a3abf8b35791d1b9b
tree9eae81802b097cb2c6b444a310e35da12e6f6cb5
parent9a8ce5a3c9841832a2ae47223c4ee490f0f3bc5d
cpp-common: replace bstd::string_view with nonstd::string_view

This patch replaces the underlying implementation of string_view wrapped
by `bt2s::string_view` with string-view-lite [1] from the same author as
the other nonstd classes we already use.

string view lite is an implementation of `std::string_view` [2] for
C++98 and up.

This change is motivated by a desire to standardise on one provider for
'nonstd' header libraries and the fact that the current implementation
we use fails to build on SLES12 and it's easier to replace it with a
working and maintained implementation than it is to debug it.

[1]: https://github.com/martinmoene/string-view-lite
[2]: https://en.cppreference.com/w/cpp/header/string_view

Change-Id: I1f9a9d62f3de35d939f514a47898a5d1b3ff0099
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12002
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
CONTRIBUTING.adoc
src/Makefile.am
src/cpp-common/bt2s/string-view.hpp
src/cpp-common/vendor/string-view-lite/string_view.hpp [new file with mode: 0644]
src/cpp-common/vendor/string-view-lite/string_view.hpp.license [new file with mode: 0644]
src/cpp-common/vendor/string_view-standalone/string_view.hpp [deleted file]
This page took 0.025185 seconds and 4 git commands to generate.