Add a deleted constructor from nullptr_t to string_view; closes #113

This commit is contained in:
Peter Dimov
2022-09-18 13:53:55 +03:00
parent 162a4e1d24
commit 1fa592c9ec
3 changed files with 28 additions and 0 deletions

10
test/sv_nullptr_fail.cpp Normal file
View File

@@ -0,0 +1,10 @@
// Copyright 2022 Peter Dimov
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
#include <boost/core/detail/string_view.hpp>
int main()
{
return boost::core::string_view( nullptr ).size() == 0;
}