StackOverflow Questions for Tag: std-span

Capy Bara
Capy Bara

Reputation: 11

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

Score: 0

Views: 47

Answers: 1

Read More
trexxet
trexxet

Reputation: 338

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

Score: 4

Views: 119

Answers: 2

Read More
einpoklum
einpoklum

Reputation: 131373

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

Score: 18

Views: 6164

Answers: 1

Read More
einpoklum
einpoklum

Reputation: 131373

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

Score: 474

Views: 208662

Answers: 4

Read More
Jan Schultke
Jan Schultke

Reputation: 39287

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

Score: 14

Views: 892

Answers: 3

Read More
dwto
dwto

Reputation: 757

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

Score: 5

Views: 121

Answers: 1

Read More
yannick
yannick

Reputation: 189

Is it possible to construct a mdspan from a span?

Score: 5

Views: 123

Answers: 1

Read More
glades
glades

Reputation: 4725

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

Score: 2

Views: 163

Answers: 1

Read More
Romain
Romain

Reputation: 21

std::span on containers of contiguous data

Score: 1

Views: 100

Answers: 1

Read More
Sam
Sam

Reputation: 836

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

Score: 3

Views: 149

Answers: 2

Read More
Sam
Sam

Reputation: 836

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

Score: -1

Views: 142

Answers: 1

Read More
VoidStar
VoidStar

Reputation: 5421

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

Score: 4

Views: 1283

Answers: 1

Read More
Joel Bodenmann
Joel Bodenmann

Reputation: 2282

Create span of string_views from C string array

Score: 7

Views: 2661

Answers: 1

Read More
einpoklum
einpoklum

Reputation: 131373

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

Score: 2

Views: 309

Answers: 1

Read More
Mikhail
Mikhail

Reputation: 21739

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

Score: 2

Views: 232

Answers: 2

Read More
Christopher Miller
Christopher Miller

Reputation: 3451

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

Score: 3

Views: 300

Answers: 1

Read More
user3188445
user3188445

Reputation: 4748

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

Score: 3

Views: 197

Answers: 2

Read More
kokobanana
kokobanana

Reputation: 29

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

Score: 2

Views: 325

Answers: 0

Read More
Pavel Sh
Pavel Sh

Reputation: 79

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

Score: 2

Views: 81

Answers: 0

Read More
certo
certo

Reputation: 13

Extracting data from a buffer using ispanstream doesn´t copy the value across when streaming to a bigger variable

Score: 1

Views: 167

Answers: 1

Read More
PreviousPage 1Next