blob: c597faf69feabcb43559d5e01bf5ffa72cd521da (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
/*
* This source code is released into the public domain.
*/
module;
#include <string>
#include <system_error>
export module nihil.core:errc;
namespace nihil {
export enum struct errc {
no_error = 0,
/*
* nihil.command
*/
incomplete_command,
/*
* nihil.util
*/
// Empty string is not allowed.
empty_string,
// Invalid unit, e.g. in parse_size()
invalid_unit,
};
export [[nodiscard]] auto nihil_category() noexcept -> std::error_category &;
export [[nodiscard]] auto make_error_condition(errc ec) -> std::error_condition;
} // namespace nihil
namespace std {
export template<>
struct is_error_condition_enum<nihil::errc> : true_type {};
} // namespace std
|