diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2016-07-21 05:31:24 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2016-07-21 05:31:24 +0000 |
commit | 053d81ceebe9a54255c49801b88ab61b5d03060a (patch) | |
tree | ea1a55b676d67b77caa7e980a2cb8ccb5ab81a69 /libcxx/test/std/strings/basic.string/string.ops/string_compare | |
parent | ed7b7d7efe9e67561f7f90ebcd65fee1e24f113f (diff) | |
download | bcm5719-llvm-053d81ceebe9a54255c49801b88ab61b5d03060a.tar.gz bcm5719-llvm-053d81ceebe9a54255c49801b88ab61b5d03060a.zip |
Implement std::string_view as described in http://wg21.link/P0254R1. Reviewed as https://reviews.llvm.org/D21459
llvm-svn: 276238
Diffstat (limited to 'libcxx/test/std/strings/basic.string/string.ops/string_compare')
-rw-r--r-- | libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string_size_size.pass.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string_size_size.pass.cpp index 3cbbea7b490..10f9d849c2b 100644 --- a/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string_size_size.pass.cpp +++ b/libcxx/test/std/strings/basic.string/string.ops/string_compare/size_size_string_size_size.pass.cpp @@ -31,7 +31,7 @@ int sign(int x) template <class S> void -test(const S& s, typename S::size_type pos1, typename S::size_type n1, +test(const S& s, typename S::size_type pos1, typename S::size_type n1, const S& str, typename S::size_type pos2, typename S::size_type n2, int x) { try @@ -40,7 +40,7 @@ test(const S& s, typename S::size_type pos1, typename S::size_type n1, assert(pos1 <= s.size()); assert(pos2 <= str.size()); } - catch (std::out_of_range&) + catch (const std::out_of_range&) { assert(pos1 > s.size() || pos2 > str.size()); } @@ -48,8 +48,8 @@ test(const S& s, typename S::size_type pos1, typename S::size_type n1, template <class S> void -test_npos(const S& s, typename S::size_type pos1, typename S::size_type n1, - const S& str, typename S::size_type pos2, int x) +test_npos(const S& s, typename S::size_type pos1, typename S::size_type n1, + const S& str, typename S::size_type pos2, int x) { try { @@ -57,7 +57,7 @@ test_npos(const S& s, typename S::size_type pos1, typename S::size_type n1, assert(pos1 <= s.size()); assert(pos2 <= str.size()); } - catch (std::out_of_range&) + catch (const std::out_of_range&) { assert(pos1 > s.size() || pos2 > str.size()); } |