StackOverflow Questions for Tag: std-span

einpoklum
einpoklum

Reputation: 132128

What is a "span" and when should I use one?

Score: 477

Views: 211994

Answers: 5

Read More
Anonymous
Anonymous

Reputation: 357

Emscripten and C++ 20

Score: 2

Views: 3014

Answers: 2

Read More
Capy Bara
Capy Bara

Reputation: 13

How can I reference a vector<Derived> with a span<Base>

Score: 0

Views: 65

Answers: 2

Read More
trexxet
trexxet

Reputation: 338

Cannot construct `std::span<T>` from `const std::vector<T>&`

Score: 4

Views: 133

Answers: 2

Read More
einpoklum
einpoklum

Reputation: 132128

What is an mdspan, and what is it used for?

Score: 19

Views: 6556

Answers: 1

Read More
Jan Schultke
Jan Schultke

Reputation: 39869

Can you convert int*[N] to std::span<const int * const>?

Score: 14

Views: 905

Answers: 3

Read More
dwto
dwto

Reputation: 805

Why extent of std::span created from a static array considered to have a dynamic_extent?

Score: 5

Views: 126

Answers: 1

Read More
yannick
yannick

Reputation: 189

Is it possible to construct a mdspan from a span?

Score: 5

Views: 130

Answers: 1

Read More
glades
glades

Reputation: 4848

std::span of a vector<bool> doesn't compile

Score: 2

Views: 188

Answers: 1

Read More
Romain
Romain

Reputation: 21

std::span on containers of contiguous data

Score: 1

Views: 113

Answers: 1

Read More
sam
sam

Reputation: 866

Why can I not pass std::span<int> to a function template taking std::span<const T>?

Score: 3

Views: 167

Answers: 2

Read More
sam
sam

Reputation: 866

std::span as type erasure over contiguous block of memory

Score: -1

Views: 147

Answers: 1

Read More
VoidStar
VoidStar

Reputation: 5421

Is there a common pattern for passing vector<string> as span<string_view>?

Score: 4

Views: 1316

Answers: 1

Read More
Joel Bodenmann
Joel Bodenmann

Reputation: 2282

Create span of string_views from C string array

Score: 7

Views: 2711

Answers: 1

Read More
einpoklum
einpoklum

Reputation: 132128

What is the difference between std::span and gsl::span?

Score: 2

Views: 365

Answers: 1

Read More
Mikhail
Mikhail

Reputation: 21799

How to pass an rvalue std::vector to a function accepting std::span

Score: 2

Views: 250

Answers: 2

Read More
Christopher Miller
Christopher Miller

Reputation: 3461

Is it possible to recover the actual index of elements in a `std::span`?

Score: 3

Views: 314

Answers: 1

Read More
user3188445
user3188445

Reputation: 4784

Best practice for declaring functions that won't modify a std::span in C++

Score: 3

Views: 206

Answers: 2

Read More
kokobanana
kokobanana

Reputation: 29

Store a std::vector of gsl::span<T> not working as expected

Score: 2

Views: 327

Answers: 0

Read More
Pavel Sh
Pavel Sh

Reputation: 79

Constructing an std::span<> from an std::ranges::forward_range?

Score: 2

Views: 82

Answers: 0

Read More
PreviousPage 1Next