]>
git.proxmox.com Git - ceph.git/blob - ceph/src/crimson/net/Errors.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 * Ceph - scalable distributed file system
6 * Copyright (C) 2017 Red Hat, Inc
8 * This is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License version 2.1, as published by the Free Software
11 * Foundation. See file COPYING.
17 #include <system_error>
19 namespace crimson::net
{
32 /// net error category
33 const std::error_category
& net_category();
35 inline std::error_code
make_error_code(error e
)
37 return {static_cast<int>(e
), net_category()};
40 inline std::error_condition
make_error_condition(error e
)
42 return {static_cast<int>(e
), net_category()};
45 } // namespace crimson::net
49 /// enables implicit conversion to std::error_condition
51 struct is_error_condition_enum
<crimson::net::error
> : public true_type
{};