1 //===----------------------------------------------------------------------===//
2 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
3 // See https://llvm.org/LICENSE.txt for license information.
4 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
5 //
6 //===----------------------------------------------------------------------===//
7 
8 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
9 // UNSUPPORTED: no-filesystem
10 // UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
11 
12 // XFAIL: availability-fp_to_chars-missing
13 
14 // <ostream>
15 
16 // The Standard does indirectly require that <ostream> includes <format>.
17 // However using the granularized headers so it's possible to implement
18 // <ostream> without <format>. This would be a non-conforming implementation.
19 //
20 // See https://github.com/llvm/llvm-project/issues/71925
21 
22 #include <ostream>
23 #include <vector>
24 
25 extern std::ostream& os;
26 
test()27 void test() {
28   std::vector<int> v{1, 2, 3};
29   std::print(os, "{} {}", 42, v);
30 }
31