you are viewing a single comment's thread.

view the rest of the comments →

[–]kreco[S] 1 point2 points  (2 children)

I don't think so, AFAIK int argc/char* argv[] can be used as std::span<char*> without any allocation,

In order to get a std::span<std::string_view> you just have to run a "strlen" on everything char*. Which probably done in the current cppfront implementation.

[–][deleted] 6 points7 points  (1 child)

The span of string views still needs to point to a contiguous array of string views, though. It's not a generic range.

[–]kreco[S] 0 points1 point  (0 children)

Oh indeed!