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(
21  
segments_view(
22  
    detail::path_ref const& ref) noexcept
22  
    detail::path_ref const& ref) noexcept
23  
    : segments_base(ref)
23  
    : segments_base(ref)
24  
{
24  
{
25  
}
25  
}
26  

26  

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

35  

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

41  

42  
} // urls
42  
} // urls
43  
} // boost
43  
} // boost
44  

44