Chris@16: // boost/cstdlib.hpp header ------------------------------------------------// Chris@16: Chris@16: // Copyright Beman Dawes 2001. Distributed under the Boost Chris@16: // Software License, Version 1.0. (See accompanying file Chris@16: // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: // See http://www.boost.org/libs/utility/cstdlib.html for documentation. Chris@16: Chris@16: // Revision History Chris@16: // 26 Feb 01 Initial version (Beman Dawes) Chris@16: Chris@16: #ifndef BOOST_CSTDLIB_HPP Chris@16: #define BOOST_CSTDLIB_HPP Chris@16: Chris@16: #include Chris@16: Chris@16: namespace boost Chris@16: { Chris@16: // The intent is to propose the following for addition to namespace std Chris@16: // in the C++ Standard Library, and to then deprecate EXIT_SUCCESS and Chris@16: // EXIT_FAILURE. As an implementation detail, this header defines the Chris@16: // new constants in terms of EXIT_SUCCESS and EXIT_FAILURE. In a new Chris@16: // standard, the constants would be implementation-defined, although it Chris@16: // might be worthwhile to "suggest" (which a standard is allowed to do) Chris@16: // values of 0 and 1 respectively. Chris@16: Chris@16: // Rationale for having multiple failure values: some environments may Chris@16: // wish to distinguish between different classes of errors. Chris@16: // Rationale for choice of values: programs often use values < 100 for Chris@16: // their own error reporting. Values > 255 are sometimes reserved for Chris@16: // system detected errors. 200/201 were suggested to minimize conflict. Chris@16: Chris@16: const int exit_success = EXIT_SUCCESS; // implementation-defined value Chris@16: const int exit_failure = EXIT_FAILURE; // implementation-defined value Chris@16: const int exit_exception_failure = 200; // otherwise uncaught exception Chris@16: const int exit_test_failure = 201; // report_error or Chris@16: // report_critical_error called. Chris@16: } Chris@16: Chris@16: #endif Chris@16: