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  

11  

12  
#include <boost/url/detail/config.hpp>
12  
#include <boost/url/detail/config.hpp>
13  
#include <boost/url/detail/segments_range.hpp>
13  
#include <boost/url/detail/segments_range.hpp>
14  
#include <boost/url/segments_view.hpp>
14  
#include <boost/url/segments_view.hpp>
15  
#include <boost/url/parse_path.hpp>
15  
#include <boost/url/parse_path.hpp>
16  

16  

17  
namespace boost {
17  
namespace boost {
18  
namespace urls {
18  
namespace urls {
19  

19  

20  
segments_view::
20  
segments_view::
 
21 +
segments_view() noexcept = default;
 
22 +

 
23 +
segments_view::
21  
segments_view(
24  
segments_view(
22  
    detail::path_ref const& ref) noexcept
25  
    detail::path_ref const& ref) noexcept
23  
    : segments_base(ref)
26  
    : segments_base(ref)
24  
{
27  
{
25  
}
28  
}
26  

29  

27  
segments_view::
30  
segments_view::
28  
segments_view(
31  
segments_view(
29  
    core::string_view s)
32  
    core::string_view s)
30  
    : segments_base(
33  
    : segments_base(
31  
        parse_path(s).value(
34  
        parse_path(s).value(
32  
            BOOST_URL_POS))
35  
            BOOST_URL_POS))
33  
{
36  
{
34  
}
37  
}
35  

38  

36  
segments_view::
39  
segments_view::
37  
segments_view(iterator first, iterator last) noexcept
40  
segments_view(iterator first, iterator last) noexcept
38  
    : segments_base(detail::make_subref(first, last))
41  
    : segments_base(detail::make_subref(first, last))
39  
{
42  
{
40  
}
43  
}
41  

44  

42  
} // urls
45  
} // urls
43  
} // boost
46  
} // boost
44  

47