libs/http/include/boost/http/rfc/detail/ws.hpp

100.0% Lines (2/2) 100.0% Functions (1/1) 100.0% Branches (4/4)
libs/http/include/boost/http/rfc/detail/ws.hpp
Line Branch Hits Source Code
1 //
2 // Copyright (c) 2021 Vinnie Falco (vinnie.falco@gmail.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/cppalliance/http
8 //
9
10 #ifndef BOOST_HTTP_RFC_DETAIL_WS_HPP
11 #define BOOST_HTTP_RFC_DETAIL_WS_HPP
12
13 namespace boost {
14 namespace http {
15 namespace detail {
16
17 // WS = SP / HTAB
18 struct ws_t
19 {
20 constexpr
21 bool
22 102346 operator()(char c) const noexcept
23 {
24
4/4
✓ Branch 0 taken 85647 times.
✓ Branch 1 taken 16699 times.
✓ Branch 2 taken 536 times.
✓ Branch 3 taken 85111 times.
102346 return c == ' ' || c == '\t';
25 }
26 };
27
28 constexpr ws_t ws{};
29
30 } // detail
31 } // http
32 } // boost
33
34 #endif
35