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

basic_string_view(const CharT*, size_type) constructor shouldn't comment out assert of nullptr and length checks #36211

Closed
JoeLoser opened this issue Mar 22, 2018 · 1 comment
Labels
bugzilla Issues migrated from bugzilla libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Comments

@JoeLoser
Copy link
Member

Bugzilla Link 36863
Resolution FIXED
Resolved on Jun 03, 2019 22:22
Version 6.0
OS All
CC @mclow

Extended Description

It looks like this check fails on GCC 4.9 per Marshall's commit message. We should revisit why and perhaps conditionally enable this assert.

    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
    basic_string_view(const _CharT* __s, size_type __len) _NOEXCEPT
        : __data(__s), __size(__len)
    {
// #if _LIBCPP_STD_VER > 11
//         _LIBCPP_ASSERT(__len == 0 || __s != nullptr, "string_view::string_view(_CharT *, size_t): received nullptr");
// #endif
    }
@mclow
Copy link
Contributor

mclow commented Jun 4, 2019

Re-enabled in revision 362465. (Now that we no longer support gcc 4.9)

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

No branches or pull requests

2 participants