segments_view.ipp 806 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. #ifndef BOOST_URL_IMPL_SEGMENTS_VIEW_IPP
  11. #define BOOST_URL_IMPL_SEGMENTS_VIEW_IPP
  12. #include <boost/url/segments_view.hpp>
  13. #include <boost/url/parse_path.hpp>
  14. namespace boost {
  15. namespace urls {
  16. segments_view::
  17. segments_view(
  18. detail::path_ref const& ref) noexcept
  19. : segments_base(ref)
  20. {
  21. }
  22. segments_view::
  23. segments_view(
  24. string_view s)
  25. : segments_view(
  26. parse_path(s).value(
  27. BOOST_URL_POS))
  28. {
  29. }
  30. } // urls
  31. } // boost
  32. #endif