cpp-common: add `bt2s::string_view`, alias of `bpstd::string_view`
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 15 Nov 2023 05:37:27 +0000 (00:37 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Thu, 14 Dec 2023 15:57:04 +0000 (10:57 -0500)
commit45f637cc09c94b0eb5cf1ebc739b5d3eb77aef33
treea1f07017015f115cce0cae458ef0df7adc32e5db
parentc022776a5704be758b90a56563d491861d29fa49
cpp-common: add `bt2s::string_view`, alias of `bpstd::string_view`

In order to avoid having all sorts of external namespaces, make
`bt2s::string_view` an alias of `nonstd::string_view`, and make sure
everything in the project uses `bt2s::string_view`.

Also add aliases for other STL types of `<string_view>`, like the
`bt2s::basic_string_view` class template.

This will make it possible to easily change the implementation without
changing the code using it indirectly (only
`cpp-common/bt2s/string-view.hpp` will change).

Move `cpp-common/string_view.hpp` to
`cpp-common/vendor/string_view-standalone/string_view.hpp` to make it
clear it's an external project.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I5172f642f5490b4a7eb21ed7cca55039452dc9b8
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11392
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
CI-Build: Simon Marchi <simon.marchi@efficios.com>
Tested-by: jenkins <jenkins@lttng.org>
src/Makefile.am
src/cpp-common/bt2s/string-view.hpp [new file with mode: 0644]
src/cpp-common/string_view.hpp [deleted file]
src/cpp-common/vendor/string_view-standalone/string_view.hpp [new file with mode: 0644]
tools/format-cpp.sh
This page took 0.025858 seconds and 4 git commands to generate.