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 // UNSUPPORTED: libcpp-has-no-incomplete-format 10 11 // <format> 12 13 // basic_format_arg() noexcept; 14 15 // The class has several exposition only private constructors. These are tested 16 // in visit_format_arg.pass.cpp 17 18 #include <format> 19 #include <cassert> 20 21 #include "test_macros.h" 22 23 template <class CharT> test()24void test() { 25 using Context = std::basic_format_context<CharT*, CharT>; 26 27 ASSERT_NOEXCEPT(std::basic_format_arg<Context>{}); 28 29 std::basic_format_arg<Context> format_arg{}; 30 assert(!format_arg); 31 } 32 test()33void test() { 34 test<char>(); 35 test<wchar_t>(); 36 #ifndef TEST_HAS_NO_CHAR8_T 37 test<char8_t>(); 38 #endif 39 test<char16_t>(); 40 test<char32_t>(); 41 } 42 main(int,char **)43int main(int, char**) { 44 test(); 45 46 return 0; 47 } 48