thrust / dependencies /libcudacxx /libcxx /test /std /utilities /function.objects /logical.operations /logical_not.pass.cpp
Download dependencies/libcudacxx/libcxx/test/std/utilities/function.objects/logical.operations/logical_not.pass.cpp from camenduru/thrust: direct link, hf CLI and curl.
- Browser
- Download file 1.12 kB
-
https://huggingface.co/camenduru/thrust/resolve/main/dependencies/libcudacxx/libcxx/test/std/utilities/function.objects/logical.operations/logical_not.pass.cpp
- Command line
-
hf download hf://camenduru/thrust/dependencies/libcudacxx/libcxx/test/std/utilities/function.objects/logical.operations/logical_not.pass.cpp
-
curl -L -o logical_not.pass.cpp https://huggingface.co/camenduru/thrust/resolve/main/dependencies/libcudacxx/libcxx/test/std/utilities/function.objects/logical.operations/logical_not.pass.cpp
1.12 kB
| //===----------------------------------------------------------------------===// | |
| // | |
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |
| // See https://llvm.org/LICENSE.txt for license information. | |
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| // | |
| //===----------------------------------------------------------------------===// | |
| // <functional> | |
| // logical_not | |
| int main(int, char**) | |
| { | |
| typedef std::logical_not<int> F; | |
| const F f = F(); | |
| static_assert((std::is_same<F::argument_type, int>::value), "" ); | |
| static_assert((std::is_same<F::result_type, bool>::value), "" ); | |
| assert(!f(36)); | |
| assert(f(0)); | |
| typedef std::logical_not<> F2; | |
| const F2 f2 = F2(); | |
| assert(!f2(36)); | |
| assert( f2(0)); | |
| assert(!f2(36L)); | |
| assert( f2(0L)); | |
| constexpr bool foo = std::logical_not<int> () (36); | |
| static_assert ( !foo, "" ); | |
| constexpr bool bar = std::logical_not<> () (36); | |
| static_assert ( !bar, "" ); | |
| return 0; | |
| } | |