[flang][runtime] Make defined formatted I/O process format elementally (#74150)
[llvm-project.git] / libcxx / test / support / test.support / test_convertible_header.pass.cpp
blobeb404ed20e8acfd73004a22696952c99f249dd51
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
11 // "support/test_convertible.h"
13 #include "test_convertible.h"
15 #include "test_macros.h"
17 struct ImplicitDefault {
18 ImplicitDefault() {}
20 static_assert(test_convertible<ImplicitDefault>(), "Must be convertible");
22 struct ExplicitDefault {
23 explicit ExplicitDefault() {}
25 static_assert(!test_convertible<ExplicitDefault>(), "Must not be convertible");
27 struct ImplicitInt {
28 ImplicitInt(int) {}
30 static_assert(test_convertible<ImplicitInt, int>(), "Must be convertible");
32 struct ExplicitInt {
33 explicit ExplicitInt(int) {}
35 static_assert(!test_convertible<ExplicitInt, int>(), "Must not be convertible");
37 struct ImplicitCopy {
38 ImplicitCopy(ImplicitCopy const&) {}
40 static_assert(test_convertible<ImplicitCopy, ImplicitCopy>(), "Must be convertible");
42 struct ExplicitCopy {
43 explicit ExplicitCopy(ExplicitCopy const&) {}
45 static_assert(!test_convertible<ExplicitCopy, ExplicitCopy>(), "Must not be convertible");
47 struct ImplicitMove {
48 ImplicitMove(ImplicitMove&&) {}
50 static_assert(test_convertible<ImplicitMove, ImplicitMove>(), "Must be convertible");
52 struct ExplicitMove {
53 explicit ExplicitMove(ExplicitMove&&) {}
55 static_assert(!test_convertible<ExplicitMove, ExplicitMove>(), "Must not be convertible");
57 struct ImplicitArgs {
58 ImplicitArgs(int, int, int) {}
60 static_assert(test_convertible<ImplicitArgs, int, int, int>(), "Must be convertible");
62 struct ExplicitArgs {
63 explicit ExplicitArgs(int, int, int) {}
65 static_assert(!test_convertible<ExplicitArgs, int, int, int>(), "Must not be convertible");
67 int main(int, char**) {
68 // Nothing to do
70 return 0;