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