[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / libcxx / test / std / utilities / function.objects / negators / binary_negate.pass.cpp
bloba3c54fa803e1c72848e1414e28703d927edde08c
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 // <functional>
11 // binary_negate
13 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS
14 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS
15 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
17 #include <functional>
18 #include <type_traits>
19 #include <cassert>
21 #include "test_macros.h"
23 int main(int, char**)
25 typedef std::binary_negate<std::logical_and<int> > F;
26 const F f = F(std::logical_and<int>());
27 static_assert((std::is_same<int, F::first_argument_type>::value), "" );
28 static_assert((std::is_same<int, F::second_argument_type>::value), "" );
29 static_assert((std::is_same<bool, F::result_type>::value), "" );
30 assert(!f(36, 36));
31 assert( f(36, 0));
32 assert( f(0, 36));
33 assert( f(0, 0));
35 return 0;