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 |
9 | |
10 | // <format> |
11 | |
12 | // template<class Context, class... Args> |
13 | // basic_format_args(format-arg-store<Context, Args...>) -> basic_format_args<Context>; |
14 | |
15 | #include <concepts> |
16 | #include <format> |
17 | |
18 | #include "test_macros.h" |
19 | |
20 | void test() { |
21 | int i = 1; |
22 | // Note the Standard way to create a format-arg-store is by using make_format_args. |
23 | static_assert(std::same_as<decltype(std::basic_format_args(std::make_format_args(i))), |
24 | std::basic_format_args<std::format_context>>); |
25 | |
26 | #ifndef TEST_HAS_NO_WIDE_CHARACTERS |
27 | static_assert(std::same_as<decltype(std::basic_format_args(std::make_wformat_args(i))), |
28 | std::basic_format_args<std::wformat_context>>); |
29 | |
30 | #endif |
31 | } |
32 | |