Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

Commit a1798df

Browse files
authored
Merge pull request #953 from KFilipek/task-make_master_great_again
string_view: change test behavior according to C++ version
2 parents 928acd8 + a7efee1 commit a1798df

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

tests/external/libcxx/string.view/string.view.access/back.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ test(const CharT *s, size_t len)
2929
static_assert(std::is_same<decltype(sv.back()),
3030
typename SV::const_reference>::value,
3131
"must be const_reference");
32+
#ifndef __cpp_lib_string_view
3233
static_assert(noexcept(sv.back()), "Operation must be noexcept");
34+
#endif
3335
UT_ASSERT(sv.length() == len);
3436
UT_ASSERT(sv.back() == s[len - 1]);
3537
return &sv.back() == s + len - 1;

tests/external/libcxx/string.view/string.view.access/front.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ test(const CharT *s, size_t len)
2828
static_assert(std::is_same<decltype(sv.front()),
2929
typename SV::const_reference>::value,
3030
"must be const_reference");
31+
#ifndef __cpp_lib_string_view
3132
static_assert(noexcept(sv.front()), "Operation must be noexcept");
33+
#endif
3234
UT_ASSERT(sv.length() == len);
3335
UT_ASSERT(sv.front() == s[0]);
3436
return &sv.front() == s;

0 commit comments

Comments
 (0)