bitwizeshift / bitwizeshift/BackportCpp

Constexpr basic_string_view

Open
#24 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
94
Forks
7
PR merge metrics
No merged PRs in 30d

Description

### Checklist

- [x] I did not find a duplicate of this feature request in the Github Issues section.

----------

### Description
The bpstd::basic_string_view uses std::char_traits as a background. This produces a error in a constexpr context:
`error: call to non-'constexpr' function 'static std::size_t std::char_traits::length(const char_type*)'`.
This is [correspond](https://en.cppreference.com/w/cpp/string/char_traits/length) to the standard because char_traits::length is marked constexpr since C++17 only.

P.S. Idk whether it's a bug or a feature request.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.