[libcxx-commits] [libcxx] r362465 - We had a _LIBCPP_ASSERT commented out because gcc 4.9 didn't like it. We (LLVM) now require GCC 5.1, so that's not a problem any more. Re-enable the assertion. Fixes PR#36863

Marshall Clow via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 3 19:07:11 PDT 2019


Author: marshall
Date: Mon Jun  3 19:07:11 2019
New Revision: 362465

URL: http://llvm.org/viewvc/llvm-project?rev=362465&view=rev
Log:
We had a _LIBCPP_ASSERT commented out because gcc 4.9 didn't like it. We (LLVM) now require GCC 5.1, so that's not a problem any more. Re-enable the assertion. Fixes PR#36863

Modified:
    libcxx/trunk/include/string_view

Modified: libcxx/trunk/include/string_view
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/string_view?rev=362465&r1=362464&r2=362465&view=diff
==============================================================================
--- libcxx/trunk/include/string_view (original)
+++ libcxx/trunk/include/string_view Mon Jun  3 19:07:11 2019
@@ -228,9 +228,9 @@ public:
     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
+#if _LIBCPP_STD_VER > 11
+    _LIBCPP_ASSERT(__len == 0 || __s != nullptr, "string_view::string_view(_CharT *, size_t): received nullptr");
+#endif
     }
 
     _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY




More information about the libcxx-commits mailing list