boostorg / boostorg/utility

boost::basic_string_view should have a trivial constructor from std::basic_string_view

Open
#40 11 comments 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
51
Forks
71
PR merge metrics
No merged PRs in 30d

Description

I am trying to use beast which makes heavy use of boost::string_view in code that already makes heavy use of std::string_view. It is awfully easy to make a constexp constructor that trivially converts a std::string_view to a boost::string_view. I added one myself but I would appreciate it if you guys would go ahead and add it in too.

```
BOOST_CONSTEXPR basic_string_view(const std::basic_string_view& str) BOOST_NOEXCEPT
: ptr_(str.data()), len_(str.size()) {}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.