Fix typo
[rofl0r-order-pp.git] / example / lambda / error.h
blob51a3ee4c27910d2d1f34e416863375714ec51178
1 #ifndef ORDER_EXAMPLE_LAMBDA_ERROR_H_VAJK20040620
2 #define ORDER_EXAMPLE_LAMBDA_ERROR_H_VAJK20040620
4 // (C) Copyright Vesa Karvonen 2004.
5 //
6 // Distributed under the Boost Software License, Version 1.0.
7 // (See accompanying file LICENSE.)
9 // `error(fmt, ...)' prints the formatted string, along with the
10 // prefix "ERROR: " and the suffix "\n", to `stderr' and then calls
11 // `exit(EXIT_FAILURE)' to terminate the program.
12 extern void error(const char* fmt, ...);
14 // `ERROR_exit(fmt, ...)' calls `error(fmt, ...)'. This macro is
15 // written in such a way that a compiler can decuce that control
16 // will never return from the code generated by the macro.
17 #define ERROR_exit(...) \
18 do { \
19 error(__VA_ARGS__); \
20 while (1) {} \
21 } while (0)
23 #endif