aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.error/sys_error.ccm
blob: 102f4c547bd58190c270918a2d0938834f0b6dd6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// This source code is released into the public domain.
module;

#include <cerrno>

export module nihil.error:sys_error;

import nihil.std;

namespace nihil {

// Allow access to errno without having to include <cerrno>.
export [[nodiscard]] auto sys_error() -> std::errc
{
	return static_cast<std::errc>(errno);
}

} // namespace nihil