| //===----------------------------------------------------------------------===// |
| // The LLVM Compiler Infrastructure |
| // This file is dual licensed under the MIT and the University of Illinois Open |
| // Source Licenses. See LICENSE.TXT for details. |
| //===----------------------------------------------------------------------===// |
| void test ( const CharT *s, size_t len ) { |
| typedef std::basic_string_view<CharT> SV; |
| assert ( sv1.size() == len ); |
| assert ( sv1.data() == s ); |
| assert ( sv1.data() == nullptr ); |
| assert ( sv1.size() == 0 ); |
| constexpr size_t test_ce ( size_t n ) { |
| typedef std::basic_string_view<char> SV; |
| SV sv1{ "ABCDEFGHIJKL", n }; |
| static_assert ( test_ce (5) == 0, "" ); |