Add `std::string_view` replacement (`bpstd::string_view`)
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 8 Dec 2020 14:48:44 +0000 (09:48 -0500)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 28 Jan 2022 16:22:26 +0000 (11:22 -0500)
This patch adds an `std::string_view` replacement, `bpstd::string_view`,
which comes from the MIT-licensed
<https://github.com/bitwizeshift/string_view-standalone> project.

Babeltrace 2 cannot use `std::string_view` as it's part of C++17,
whereas the project only requires C++11.

`bpstd::basic_string_view` and `bpstd::string_view` are meant to work
like C++17's `std::basic_string_view` and `std::string_view`.

In any Babeltrace 2 C++ file, include it like this:

    #include "cpp-common/string_view.hpp"

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: Icd9329fb55959de92832f4715b02359e1ef44184
Reviewed-on: https://review.lttng.org/c/babeltrace/+/4519


No differences found
This page took 0.026379 seconds and 4 git commands to generate.