boostorg / boostorg/url

Explore relationship between grammar::string_view_base and std::string_view

Open
#881 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
205
Forks
60
PR merge metrics
No merged PRs in 30d

Description

Can someone derive from `std::string_view` as an alternative to deriving from `boost::urls::grammar::string_view_base`?

`string_view_base` stores a `core::string_view` and is a proxy for its member functions. In principle and semantically, it's guaranteed that `string_view_base` is OK to use as a base class while `std::string_view` or `core::string_view` are not. In practice, `string_view_base` has no virtual functions and doesn't have a virtual destructor.

The only class that refers to and derives from it is `pct_string_view`, making it inherit the usual member functions of a string_view.

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.