cpp-common: add `bt2s::span` 0.11.0 and other related symbols
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 31 Jan 2024 22:41:47 +0000 (17:41 -0500)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 5 Feb 2024 16:46:02 +0000 (11:46 -0500)
This patch adds `bt2s::span` which wraps `nonstd::span`, that is,
span lite [1], a project written by the author also who wrote our
`bt2s::optional` implementation, therefore I trust him.

span lite is an implementation of `std::span` [2] for C++98 and up:

> The class template `span` describes an object that can refer to a
> contiguous sequence of objects with the first element of the sequence
> at position zero.

This will be useful to pass some data block as a single parameter
without copying the viewed data (in other words, a pointer and a length
with some sugar such as operator[]() and the like).

[1]: https://github.com/martinmoene/span-lite
[2]: https://en.cppreference.com/w/cpp/container/span

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: Ife35b4be41536fec15aef9d6603a80746c3e8727
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11728
CI-Build: Simon Marchi <simon.marchi@efficios.com>
Tested-by: jenkins <jenkins@lttng.org>

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