From 61b9a7258a7693d7f3674a5a1daf7b036ff1d382 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 6 Sep 2015 18:46:46 +0000 Subject: Import libc++ 3.7.0 release (r246257). --- .../string.view.cons/from_string1.fail.cpp | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 test/std/experimental/string.view/string.view.cons/from_string1.fail.cpp (limited to 'test/std/experimental/string.view/string.view.cons/from_string1.fail.cpp') diff --git a/test/std/experimental/string.view/string.view.cons/from_string1.fail.cpp b/test/std/experimental/string.view/string.view.cons/from_string1.fail.cpp new file mode 100644 index 000000000000..6ef4b9669bf4 --- /dev/null +++ b/test/std/experimental/string.view/string.view.cons/from_string1.fail.cpp @@ -0,0 +1,32 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + + +// + +// template +// basic_string_view(const basic_string<_CharT, _Traits, Allocator>& _str) noexcept + +#include +#include +#include + +struct dummy_char_traits : public std::char_traits {}; + +int main () { + using string_view = std::experimental::basic_string_view; + using string = std:: basic_string ; + + { + string s{"QBCDE"}; + string_view sv1 ( s ); + assert ( sv1.size() == s.size()); + assert ( sv1.data() == s.data()); + } +} \ No newline at end of file -- cgit v1.3