xtd 0.2.0
exit_status.h
Go to the documentation of this file.
1 #pragma once
5 #include "enum.h"
6 #include <cstdlib>
7 
9 namespace xtd {
18  enum class exit_status {
20  success = EXIT_SUCCESS,
22  failure = EXIT_FAILURE,
23  };
24 }
25 
27 template<> struct xtd::enum_register<xtd::exit_status> {
28  explicit operator auto() const noexcept {return xtd::enum_collection<xtd::exit_status> {{xtd::exit_status::success, "success"}, {xtd::exit_status::failure, "failure"}};}
29 };
Unsuccessful execution of a program. Is equal to EXIT_FAILURE.
Successful execution of a program. Is equal to EXIT_SUCCESS.
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
std::vector< std::pair< enum_t, xtd::ustring > > enum_collection
Represents a pair of an enum_t value and a string of an enum of type enum_t.
Definition: enum_collection.h:19
exit_status
Specifies exit status for the xtd::environment::exit method.
Definition: exit_status.h:18
Contains enum_ and enum_ut_ keywords.
Provides the registration struct for enumerations.
Definition: enum_register.h:36