Mark string_view's constructor from (ptr,len) as noexcept (an extension). Update the tests to check this (and other noexcept bits

llvm-svn: 316456
This commit is contained in:
Marshall Clow
2017-10-24 16:30:06 +00:00
parent 9c8f853ca9
commit ac2b3e3a7a
5 changed files with 16 additions and 4 deletions

View File

@@ -23,7 +23,10 @@
template<typename CharT>
void test ( const CharT *s, size_t sz ) {
{
std::basic_string_view<CharT> sv1 ( s, sz );
typedef std::basic_string_view<CharT> SV;
LIBCPP_ASSERT_NOEXCEPT(SV(s, sz));
SV sv1 ( s, sz );
assert ( sv1.size() == sz );
assert ( sv1.data() == s );
}