include/boost/url/impl/segments_view.hpp

100.0% Lines (14/14) 100.0% Functions (4/4)
include/boost/url/impl/segments_view.hpp
Line TLA Hits Source Code
1 //
2 // Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
3 // Copyright (c) 2022 Alan de Freitas (alandefreitas@gmail.com)
4 //
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)
7 //
8 // Official repository: https://github.com/boostorg/url
9 //
10
11 #ifndef BOOST_URL_IMPL_SEGMENTS_VIEW_HPP
12 #define BOOST_URL_IMPL_SEGMENTS_VIEW_HPP
13
14 #include <boost/url/detail/segments_range.hpp>
15
16 namespace boost {
17 namespace urls {
18
19 inline
20 1 segments_view::
21 segments_view() noexcept = default;
22
23 inline
24 117 segments_view::
25 segments_view(
26 117 detail::path_ref const& ref) noexcept
27 117 : segments_base(ref)
28 {
29 117 }
30
31 inline
32 19 segments_view::
33 segments_view(
34 19 core::string_view s)
35 : segments_base(
36 25 parse_path(s).value(
37 19 BOOST_URL_POS))
38 {
39 13 }
40
41 inline
42 20 segments_view::
43 20 segments_view(iterator first, iterator last) noexcept
44 20 : segments_base(detail::make_subref(first, last))
45 {
46 20 }
47
48 } // urls
49 } // boost
50
51 #endif
52