From 53a420fba21cf1644972b34dcd811a43cdb8368d Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 2 Jan 2017 19:18:58 +0000 Subject: Vendor import of libc++ trunk r290819: https://llvm.org/svn/llvm-project/libcxx/trunk@290819 --- .../basic.string/string.cons/string_view.fail.cpp | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 test/std/strings/basic.string/string.cons/string_view.fail.cpp (limited to 'test/std/strings/basic.string/string.cons/string_view.fail.cpp') diff --git a/test/std/strings/basic.string/string.cons/string_view.fail.cpp b/test/std/strings/basic.string/string.cons/string_view.fail.cpp new file mode 100644 index 000000000000..70459b2dcfb4 --- /dev/null +++ b/test/std/strings/basic.string/string.cons/string_view.fail.cpp @@ -0,0 +1,23 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// + +// explicit basic_string(basic_string_view sv, const Allocator& a = Allocator()); + +#include +#include + +void foo ( const string &s ) {} + +int main() +{ + std::string_view sv = "ABCDE"; + foo(sv); // requires implicit conversion from string_view to string +} -- cgit v1.3