quick_exit_check1.fail.cpp 629 B

1234567891011121314151617181920212223242526
  1. //===----------------------------------------------------------------------===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is dual licensed under the MIT and the University of Illinois Open
  6. // Source Licenses. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. //
  10. // UNSUPPORTED: c++98, c++03
  11. // test that referencing at_quick_exit when _LIBCPP_HAS_QUICK_EXIT is not defined
  12. // results in a compile error.
  13. #include <cstdlib>
  14. void f() {}
  15. int main()
  16. {
  17. #ifndef _LIBCPP_HAS_QUICK_EXIT
  18. std::at_quick_exit(f);
  19. #else
  20. #error
  21. #endif
  22. }