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:
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user