100.00% Lines (14/14) 100.00% Functions (4/4)
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_VIEW_HPP 11   #ifndef BOOST_URL_IMPL_SEGMENTS_VIEW_HPP
12   #define BOOST_URL_IMPL_SEGMENTS_VIEW_HPP 12   #define BOOST_URL_IMPL_SEGMENTS_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_view:: 20   2 segments_view::
21   segments_view() noexcept = default; 21   segments_view() noexcept = default;
22   22  
23   inline 23   inline
HITCBC 24   5843 segments_view:: 24   5843 segments_view::
25   segments_view( 25   segments_view(
HITCBC 26   5843 detail::path_ref const& ref) noexcept 26   5843 detail::path_ref const& ref) noexcept
HITCBC 27   5843 : segments_base(ref) 27   5843 : segments_base(ref)
28   { 28   {
HITCBC 29   5843 } 29   5843 }
30   30  
31   inline 31   inline
HITCBC 32   19 segments_view:: 32   19 segments_view::
33   segments_view( 33   segments_view(
HITCBC 34   19 core::string_view s) 34   19 core::string_view s)
35   : segments_base( 35   : segments_base(
HITCBC 36   25 parse_path(s).value( 36   25 parse_path(s).value(
HITCBC 37   19 BOOST_URL_POS)) 37   19 BOOST_URL_POS))
38   { 38   {
HITCBC 39   13 } 39   13 }
40   40  
41   inline 41   inline
HITCBC 42   20 segments_view:: 42   20 segments_view::
HITCBC 43   20 segments_view(iterator first, iterator last) noexcept 43   20 segments_view(iterator first, iterator last) noexcept
HITCBC 44   20 : segments_base(detail::make_subref(first, last)) 44   20 : segments_base(detail::make_subref(first, last))
45   { 45   {
HITCBC 46   20 } 46   20 }
47   47  
48   } // urls 48   } // urls
49   } // boost 49   } // boost
50   50  
51   #endif 51   #endif