]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/beast/websocket/detail/error.hpp
Add patch for failing prerm scripts
[ceph.git] / ceph / src / boost / boost / beast / websocket / detail / error.hpp
CommitLineData
11fdf7f2
TL
1//
2// Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
3//
4// Distributed under the Boost Software License, Version 1.0. (See accompanying
5// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6//
7// Official repository: https://github.com/boostorg/beast
8//
9
10#ifndef BOOST_BEAST_WEBSOCKET_DETAIL_ERROR_IPP
11#define BOOST_BEAST_WEBSOCKET_DETAIL_ERROR_IPP
12
13#include <boost/beast/core/error.hpp>
14#include <boost/beast/core/string.hpp>
15
16namespace boost {
17
18namespace beast {
19namespace websocket {
20enum class error;
21enum class condition;
22} // websocket
23} // beast
24
25namespace system {
26template<>
27struct is_error_code_enum<beast::websocket::error>
28{
29 static bool const value = true;
30};
31template<>
32struct is_error_condition_enum<beast::websocket::condition>
33{
34 static bool const value = true;
35};
36} // system
37
38namespace beast {
39namespace websocket {
40namespace detail {
41
42class error_codes : public error_category
43{
44public:
45 const char*
46 name() const noexcept override;
47
48 std::string
49 message(int ev) const override;
50
51 error_condition
52 default_error_condition(int ev) const noexcept override;
53};
54
55class error_conditions : public error_category
56{
57public:
58 const char*
59 name() const noexcept override;
60
61 std::string
62 message(int cv) const override;
63};
64
65} // detail
66
67error_code
68make_error_code(error e);
69
70error_condition
71make_error_condition(condition c);
72
73} // websocket
74} // beast
75
76} // boost
77
78#endif