Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / libcxx / test / std / input.output / iostream.format / quoted.manip / quoted_traits.verify.cpp
blobe457adb5edda8fa0cc7901d5ce402c4190966e2a
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 // <iomanip>
11 // quoted
13 // UNSUPPORTED: c++03, c++11
15 #include <iomanip>
16 #include <sstream>
17 #include <string>
19 // Test that mismatches in the traits between the quoted object and the dest string are diagnosed.
21 template <class charT>
22 struct test_traits {
23 typedef charT char_type;
26 void round_trip ( const char *p ) {
27 std::stringstream ss;
28 ss << std::quoted(p);
29 std::basic_string<char, test_traits<char>> s;
30 ss >> std::quoted(s); // expected-error {{invalid operands to binary expression}}
33 void f() {
34 round_trip("Hi Mom");