100.00% Lines (16/16) 100.00% Functions (5/5)
TLA Baseline Branch
Line Hits Code Line Hits Code
1   // 1   //
2   // Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com) 2   // Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
3   // Copyright (c) 2022 Alan de Freitas (alandefreitas@gmail.com) 3   // Copyright (c) 2022 Alan de Freitas (alandefreitas@gmail.com)
4   // 4   //
5   // Distributed under the Boost Software License, Version 1.0. (See accompanying 5   // Distributed under the Boost Software License, Version 1.0. (See accompanying
6   // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6   // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7   // 7   //
8   // Official repository: https://github.com/boostorg/url 8   // Official repository: https://github.com/boostorg/url
9   // 9   //
10   10  
11   #ifndef BOOST_URL_IMPL_SEGMENTS_ENCODED_VIEW_HPP 11   #ifndef BOOST_URL_IMPL_SEGMENTS_ENCODED_VIEW_HPP
12   #define BOOST_URL_IMPL_SEGMENTS_ENCODED_VIEW_HPP 12   #define BOOST_URL_IMPL_SEGMENTS_ENCODED_VIEW_HPP
13   13  
14   #include <boost/url/detail/segments_range.hpp> 14   #include <boost/url/detail/segments_range.hpp>
15   15  
16   namespace boost { 16   namespace boost {
17   namespace urls { 17   namespace urls {
18   18  
19   inline 19   inline
HITCBC 20   2 segments_encoded_view:: 20   2 segments_encoded_view::
21   segments_encoded_view() noexcept = default; 21   segments_encoded_view() noexcept = default;
22   22  
23   inline 23   inline
HITCBC 24   1142 segments_encoded_view:: 24   1142 segments_encoded_view::
25   segments_encoded_view( 25   segments_encoded_view(
HITCBC 26   1142 detail::path_ref const& ref) noexcept 26   1142 detail::path_ref const& ref) noexcept
HITCBC 27   1142 : segments_encoded_base(ref) 27   1142 : segments_encoded_base(ref)
28   { 28   {
HITCBC 29   1142 } 29   1142 }
30   30  
31   inline 31   inline
HITCBC 32   116 segments_encoded_view:: 32   116 segments_encoded_view::
33   segments_encoded_view( 33   segments_encoded_view(
HITCBC 34   116 core::string_view s) 34   116 core::string_view s)
35   : segments_encoded_view( 35   : segments_encoded_view(
HITCBC 36   116 parse_path(s).value( 36   116 parse_path(s).value(
HITCBC 37   6 BOOST_URL_POS)) 37   6 BOOST_URL_POS))
38   { 38   {
HITCBC 39   110 } 39   110 }
40   40  
41   inline 41   inline
HITCBC 42   3 segments_encoded_view:: 42   3 segments_encoded_view::
HITCBC 43   3 segments_encoded_view(iterator first, iterator last) noexcept 43   3 segments_encoded_view(iterator first, iterator last) noexcept
HITCBC 44   3 : segments_encoded_base(detail::make_subref(first, last)) 44   3 : segments_encoded_base(detail::make_subref(first, last))
45   { 45   {
HITCBC 46   3 } 46   3 }
47   47  
48   inline 48   inline
HITCBC 49   57 segments_encoded_view:: 49   57 segments_encoded_view::
50   operator 50   operator
51   segments_view() const noexcept 51   segments_view() const noexcept
52   { 52   {
HITCBC 53   57 return { ref_ }; 53   57 return { ref_ };
54   } 54   }
55   55  
56   } // urls 56   } // urls
57   } // boost 57   } // boost
58   58  
59   #endif 59   #endif