| author | William Roberts <williamr@symbian.org> |
| Wed, 31 Mar 2010 12:27:01 +0100 | |
| branch | Symbian2 |
| changeset 3 | e1b950c65cb4 |
| permissions | -rw-r--r-- |
| williamr@2 | 1 |
// boost/cstdlib.hpp header ------------------------------------------------// |
| williamr@2 | 2 |
|
| williamr@2 | 3 |
// Copyright Beman Dawes 2001. Distributed under the Boost |
| williamr@2 | 4 |
// Software License, Version 1.0. (See accompanying file |
| williamr@2 | 5 |
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| williamr@2 | 6 |
|
| williamr@2 | 7 |
// See http://www.boost.org/libs/utility/cstdlib.html for documentation. |
| williamr@2 | 8 |
|
| williamr@2 | 9 |
// Revision History |
| williamr@2 | 10 |
// 26 Feb 01 Initial version (Beman Dawes) |
| williamr@2 | 11 |
|
| williamr@2 | 12 |
#ifndef BOOST_CSTDLIB_HPP |
| williamr@2 | 13 |
#define BOOST_CSTDLIB_HPP |
| williamr@2 | 14 |
|
| williamr@2 | 15 |
#include <cstdlib> |
| williamr@2 | 16 |
|
| williamr@2 | 17 |
namespace boost |
| williamr@2 | 18 |
{
|
| williamr@2 | 19 |
// The intent is to propose the following for addition to namespace std |
| williamr@2 | 20 |
// in the C++ Standard Library, and to then deprecate EXIT_SUCCESS and |
| williamr@2 | 21 |
// EXIT_FAILURE. As an implementation detail, this header defines the |
| williamr@2 | 22 |
// new constants in terms of EXIT_SUCCESS and EXIT_FAILURE. In a new |
| williamr@2 | 23 |
// standard, the constants would be implementation-defined, although it |
| williamr@2 | 24 |
// might be worthwhile to "suggest" (which a standard is allowed to do) |
| williamr@2 | 25 |
// values of 0 and 1 respectively. |
| williamr@2 | 26 |
|
| williamr@2 | 27 |
// Rationale for having multiple failure values: some environments may |
| williamr@2 | 28 |
// wish to distinguish between different classes of errors. |
| williamr@2 | 29 |
// Rationale for choice of values: programs often use values < 100 for |
| williamr@2 | 30 |
// their own error reporting. Values > 255 are sometimes reserved for |
| williamr@2 | 31 |
// system detected errors. 200/201 were suggested to minimize conflict. |
| williamr@2 | 32 |
|
| williamr@2 | 33 |
const int exit_success = EXIT_SUCCESS; // implementation-defined value |
| williamr@2 | 34 |
const int exit_failure = EXIT_FAILURE; // implementation-defined value |
| williamr@2 | 35 |
const int exit_exception_failure = 200; // otherwise uncaught exception |
| williamr@2 | 36 |
const int exit_test_failure = 201; // report_error or |
| williamr@2 | 37 |
// report_critical_error called. |
| williamr@2 | 38 |
} |
| williamr@2 | 39 |
|
| williamr@2 | 40 |
#endif |
| williamr@2 | 41 |