brintos

brintos / llvm-project-archived public Read only

0
0
Text · 898 B · e097f27 Raw
32 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// <functional>10 11// not212 13// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS14// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS15// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS16 17#include <functional>18#include <cassert>19 20#include "test_macros.h"21 22int main(int, char**)23{24    typedef std::logical_and<int> F;25    assert(!std::not2(F())(36, 36));26    assert( std::not2(F())(36, 0));27    assert( std::not2(F())(0, 36));28    assert( std::not2(F())(0, 0));29 30  return 0;31}32