• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 // test <csetjmp>
11 
12 #include <csetjmp>
13 #include <type_traits>
14 
15 #ifndef setjmp
16 #error setjmp not defined
17 #endif
18 
main()19 int main()
20 {
21     std::jmp_buf jb;
22     ((void)jb); // Prevent unused warning
23     static_assert((std::is_same<decltype(std::longjmp(jb, 0)), void>::value),
24                   "std::is_same<decltype(std::longjmp(jb, 0)), void>::value");
25 }
26