GCC Code Coverage Report


Directory: libs/http_proto/
File: libs/http_proto/src/fields.cpp
Date: 2024-03-04 15:37:43
Exec Total Coverage
Lines: 30 30 100.0%
Functions: 6 6 100.0%
Branches: 0 0 -%

Line Branch Exec Source
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_proto
8 //
9
10 #include <boost/http_proto/fields.hpp>
11 #include <boost/http_proto/fields_view.hpp>
12 #include <string>
13
14 namespace boost {
15 namespace http_proto {
16
17 44 fields::
18 44 fields() noexcept
19 : fields_view_base(
20 44 &this->fields_base::h_)
21 , fields_base(
22 44 detail::kind::fields)
23 {
24 44 }
25
26 478 fields::
27 fields(
28 478 core::string_view s)
29 : fields_view_base(
30 478 &this->fields_base::h_)
31 , fields_base(
32 478 detail::kind::fields, s)
33 {
34 478 }
35
36 10 fields::
37 fields(
38 10 fields&& other) noexcept
39 : fields_view_base(
40 10 &this->fields_base::h_)
41 10 , fields_base(other.h_.kind)
42 {
43 10 swap(other);
44 10 }
45
46 4 fields::
47 fields(
48 4 fields const& other)
49 : fields_view_base(
50 4 &this->fields_base::h_)
51 4 , fields_base(*other.ph_)
52 {
53 4 }
54
55 4 fields::
56 fields(
57 4 fields_view const& other)
58 : fields_view_base(
59 4 &this->fields_base::h_)
60 4 , fields_base(*other.ph_)
61 {
62 4 }
63
64 fields&
65 3 fields::
66 operator=(
67 fields&& other) noexcept
68 {
69 3 fields tmp(std::move(other));
70 3 tmp.swap(*this);
71 3 return *this;
72 }
73
74 } // http_proto
75 } // boost
76