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 //===----------------------------------------------------------------------===//
8 
9 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
10 // UNSUPPORTED: no-filesystem
11 // UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
12 
13 // XFAIL: availability-fp_to_chars-missing
14 
15 // <ostream>
16 
17 // The Standard does indirectly require that <ostream> includes <format>.
18 // However using the granularized headers so it's possible to implement
19 // <ostream> without <format>. This would be a non-conforming implementation.
20 //
21 // See https://github.com/llvm/llvm-project/issues/71925
22 
23 #include <ostream>
24 #include <vector>
25 
26 extern std::ostream& os;
27 
28 void test() {
29   std::vector<int> v{1, 2, 3};
30   std::print(os, "{} {}", 42, v);
31 }
32