string-view-lite icon indicating copy to clipboard operation
string-view-lite copied to clipboard

string_view lite - A C++17-like string_view for C++98, C++11 and later in a single-file header-only library

Results 7 string-view-lite issues
Sort by recently updated
recently updated
newest added

I'm trying to compile one of the examples of my [cuda-api-wrappers library](https://github.com/eyalroz/cuda-api-wrappers), which uses string-view-lite, using C++14 instead of C++11 like I was compiling it so far. I get: ```...

Currently, the `find()` method of basic_string_view is nssv_constexpr14. It seems to me it should be possible to make it constexpr since C++11 with tail-recursion iteration.

When introducing `string_view` into an old codebase, it is quite easy to accidentally leave nonsensical assignments from or comparisons to `nullptr` in your code. Adding a deleted constructor as follows...

See [p1402 - std::cstring_view - a C compatible std::string_view adapter](http://wg21.link/p1402). ___ 20240607 – See also: - [My proposal of `std::basic_cstring`](https://lists.isocpp.org/std-proposals/2019/05/0018.php) ([alternative link](https://lists.isocpp.org/std-proposals/att-0018/attachment)) – [test string.cc](https://lists.isocpp.org/std-proposals/att-0018/cstring.cc), [cstring.h](https://lists.isocpp.org/std-proposals/att-0018/cstring.h) by _sotrdg_.

See: - Marc Mutz,[StringViews, StringViews everywhere!](https://youtu.be/0QFPKgvLhao?t=29m40s) @30m, Meeting C++ 2017. - Klaus Iglberger, [“Free Your Functions!”](https://www.youtube.com/watch?v=WLDT1lDOsb4) ([slides](https://github.com/CppCon/CppCon2017/blob/master/Presentations/Free%20Your%20Functions/Free%20Your%20Functions%20-%20Klaus%20Iglberger%20-%20CppCon%202017.pdf)), CppCon 2017.

- [x] on wandbox, update string_view.hpp to version 0.2.0 - [x] on godbolt, update string_view.hpp to version 0.2.0 - [ ] on godbolt, show string view lite's version number, see...

The option -Wliteral-suffix was introduced in gcc 4.8, and ```#pragma GCC diagnostic push``` was added in 4.6. Using the header with an older gcc would lead to warnings like: ```...