diff options
Diffstat (limited to 'test/std/strings/basic.string.literals/literal2.fail.cpp')
-rw-r--r-- | test/std/strings/basic.string.literals/literal2.fail.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/std/strings/basic.string.literals/literal2.fail.cpp b/test/std/strings/basic.string.literals/literal2.fail.cpp new file mode 100644 index 0000000000000..68f1d254e3279 --- /dev/null +++ b/test/std/strings/basic.string.literals/literal2.fail.cpp @@ -0,0 +1,20 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// +#include <string> +#include <cassert> + +int main() +{ +#if _LIBCPP_STD_VER > 11 + std::string foo = ""s; // should fail w/conversion operator not found +#else +#error +#endif +} |