[OpenMP][Flang] Workaround omp_lib error (#123666)
[llvm-project.git] / libcxx / test / std / utilities / format / format.arguments / format.args / ctad.compile.pass.cpp
blobe1c34936182923313842808ed0a3bbd3f60e43b6
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 // UNSUPPORTED: c++03, c++11, c++14, c++17
11 // <format>
13 // template<class Context, class... Args>
14 // basic_format_args(format-arg-store<Context, Args...>) -> basic_format_args<Context>;
16 #include <concepts>
17 #include <format>
19 #include "test_macros.h"
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>>);
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>>);
31 #endif