vformat.hpp 818 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // Copyright (c) 2022 Alan de Freitas (alandefreitas@gmail.com)
  3. //
  4. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. // Official repository: https://github.com/boostorg/url
  8. //
  9. #ifndef BOOST_URL_DETAIL_FORMAT_HPP
  10. #define BOOST_URL_DETAIL_FORMAT_HPP
  11. #include <boost/url/detail/format_args.hpp>
  12. #include <boost/core/detail/string_view.hpp>
  13. #include <boost/url/url.hpp>
  14. namespace boost {
  15. namespace urls {
  16. namespace detail {
  17. BOOST_URL_DECL
  18. void
  19. vformat_to(
  20. url_base& u,
  21. core::string_view fmt,
  22. detail::format_args args);
  23. inline
  24. url
  25. vformat(
  26. core::string_view fmt,
  27. detail::format_args args)
  28. {
  29. url u;
  30. vformat_to(u, fmt, args);
  31. return u;
  32. }
  33. } // detail
  34. } // url
  35. } // boost
  36. #endif