logical_not.pass.cpp 635 B

12345678910111213141516171819202122232425
  1. //===----------------------------------------------------------------------===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is distributed under the University of Illinois Open Source
  6. // License. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. // <functional>
  10. // logical_not
  11. #include <functional>
  12. #include <type_traits>
  13. #include <cassert>
  14. int main()
  15. {
  16. typedef std::logical_not<int> F;
  17. const F f = F();
  18. static_assert((std::is_base_of<std::unary_function<int, bool>, F>::value), "");
  19. assert(!f(36));
  20. assert(f(0));
  21. }