// file : libbutl/url.ixx -*- C++ -*- // license : MIT; see accompanying LICENSE file LIBBUTL_MODEXPORT namespace butl //@@ MOD Clang needs this for some reason. { // url_traits // template inline typename url_traits::path_type url_traits:: translate_path (string_type&& path) { return path_type (basic_url::decode (path)); } template inline typename url_traits::string_type url_traits:: translate_path (const path_type& path) { using url = basic_url; return url::encode ( string_type (path), [] (typename url::char_type& c) {return !url::path_char (c);}); } // basic_url // template inline basic_url:: basic_url (scheme_type s, optional a, optional p, optional q, optional f) : scheme (std::move (s)), authority (std::move (a)), path (std::move (p)), query (std::move (q)), fragment (std::move (f)) { } template inline basic_url:: basic_url (scheme_type s, host_type h, optional p, optional q, optional f) : basic_url (std::move (s), authority_type {string_type (), std::move (h), 0}, std::move (p), std::move (q), std::move (f)) { } template inline basic_url:: basic_url (scheme_type s, host_type h, std::uint16_t o, optional p, optional q, optional f) : basic_url (std::move (s), authority_type {string_type (), std::move (h), o}, std::move (p), std::move (q), std::move (f)) { } template inline basic_url:: basic_url (scheme_type s, string_type h, optional p, optional q, optional f) : basic_url (std::move (s), host_type (std::move (h)), std::move (p), std::move (q), std::move (f)) { } template inline basic_url:: basic_url (scheme_type s, string_type h, std::uint16_t o, optional p, optional q, optional f) : basic_url (std::move (s), host_type (std::move (h)), o, std::move (p), std::move (q), std::move (f)) { } template inline basic_url:: basic_url (scheme_type s, optional p, optional q, optional f) : scheme (std::move (s)), path (std::move (p)), query (std::move (q)), fragment (std::move (f)), rootless (true) { } }