cpp-common/bt2c: enable span-lite's `make_span()` function
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 21 Mar 2024 14:37:54 +0000 (10:37 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 26 Mar 2024 18:56:36 +0000 (14:56 -0400)
commita111fb7da2c4aae9fa8f91891071231fe214d9c2
tree3c6ca6ea7ec1bf23209c271d281a00be931b17e7
parent25fe6ea5b2626380612aeb0db1a9fa71d3c53952
cpp-common/bt2c: enable span-lite's `make_span()` function

Enable span-lite's `make_span()` function, which exists to compensate
for the lack of class template argument deduction in C++ pre 17.  This
allows creating spans without being too verbose.  This is not a standard
function, but the day we switch to C++ 17 and want to use `std::span`,
we can just replace all uses of `make_span()` with calls to
`std::span`'s constructor.

Make one version of `nonstd::make_span` (expected to be used in an
upcoming patch) available as `bt2c::makeSpan()`.

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