Add tests to make sure that <string_view> provides std::size/data/empty in C++17 mode. This is LWG#3009, coming up for a vote in JAX - but we already do it, just don't have tests

llvm-svn: 323719
This commit is contained in:
Marshall Clow
2018-01-30 00:47:43 +00:00
parent ee4e2e718d
commit aafb3151a8
5 changed files with 40 additions and 1 deletions

View File

@@ -22,6 +22,10 @@ void test ( const CharT *s, size_t len ) {
std::basic_string_view<CharT> sv ( s, len );
assert ( sv.length() == len );
assert ( sv.data() == s );
#if TEST_STD_VER > 14
// make sure we pick up std::data, too!
assert ( sv.data() == std::data(sv));
#endif
}
int main () {