xref: /llvm-project/libcxx/test/std/language.support/support.start.term/quick_exit.pass.cpp (revision 2df59c50688c122bbcae7467d3eaf862c3ea3088)
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 //===----------------------------------------------------------------------===//
8 // UNSUPPORTED: c++98, c++03
9 
10 // test quick_exit and at_quick_exit
11 
12 #include <cstdlib>
13 
14 void f() {}
15 
16 int main(int, char**)
17 {
18 #ifdef _LIBCPP_HAS_QUICK_EXIT
19     std::at_quick_exit(f);
20     std::quick_exit(0);
21 #endif
22 
23   return 0;
24 }
25