Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(cmake): always mark HAS_STRING_VIEW as part of the interface #766

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Tachi107
Copy link
Contributor

@Tachi107 Tachi107 commented Dec 21, 2022

If the library gets compiled with HAS_STRING_VIEW=1, consumers always need to link to the functions using std::string_view, as they are the only ones compiled into the shared library.

If the library gets compiled with e.g. C++17 and the user uses an older standard version they'll still get an error, but an helpful compile-time one suggesting to enable C++17 mode, instead of a cryptic linking error.

You can find a longer explanation here: #754 (comment)

…of the interface

If the library gets compiled with HAS_STRING_VIEW=1, consumers always
need to link to the functions using std::string_view, as they are the
only ones compiled into the shared library.

You can find a longer explanation here:
<HowardHinnant#754 (comment)>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant