[AMDGPU] Do not remat instructions with PhysReg uses (#124366)
[llvm-project.git] / libcxx / test / std / utilities / function.objects / operations.implicit_ctad.pass.cpp
blobbb4fb4bf71c1dd15af83180dccf23739a5af270c
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
11 // <functional>
13 // Make sure that we can use CTAD with operations in <functional>
15 #include <functional>
17 #include "test_macros.h"
19 int main(int, char**) {
21 std::plus f;
22 ASSERT_SAME_TYPE(decltype(f), std::plus<>);
25 std::minus f;
26 ASSERT_SAME_TYPE(decltype(f), std::minus<>);
29 std::multiplies f;
30 ASSERT_SAME_TYPE(decltype(f), std::multiplies<>);
33 std::divides f;
34 ASSERT_SAME_TYPE(decltype(f), std::divides<>);
37 std::modulus f;
38 ASSERT_SAME_TYPE(decltype(f), std::modulus<>);
41 std::negate f;
42 ASSERT_SAME_TYPE(decltype(f), std::negate<>);
45 std::bit_and f;
46 ASSERT_SAME_TYPE(decltype(f), std::bit_and<>);
49 std::bit_not f;
50 ASSERT_SAME_TYPE(decltype(f), std::bit_not<>);
53 std::bit_or f;
54 ASSERT_SAME_TYPE(decltype(f), std::bit_or<>);
57 std::bit_xor f;
58 ASSERT_SAME_TYPE(decltype(f), std::bit_xor<>);
61 std::equal_to f;
62 ASSERT_SAME_TYPE(decltype(f), std::equal_to<>);
65 std::not_equal_to f;
66 ASSERT_SAME_TYPE(decltype(f), std::not_equal_to<>);
69 std::less f;
70 ASSERT_SAME_TYPE(decltype(f), std::less<>);
73 std::less_equal f;
74 ASSERT_SAME_TYPE(decltype(f), std::less_equal<>);
77 std::greater_equal f;
78 ASSERT_SAME_TYPE(decltype(f), std::greater_equal<>);
81 std::greater f;
82 ASSERT_SAME_TYPE(decltype(f), std::greater<>);
85 std::logical_and f;
86 ASSERT_SAME_TYPE(decltype(f), std::logical_and<>);
89 std::logical_not f;
90 ASSERT_SAME_TYPE(decltype(f), std::logical_not<>);
93 std::logical_or f;
94 ASSERT_SAME_TYPE(decltype(f), std::logical_or<>);
97 return 0;