diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-12-10 10:02:19 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-12-26 13:25:37 +0300 |
commit | e5bfd17637bf297c3cfe509d51027916864092d5 (patch) | |
tree | 5dab56d6a5aee0a38da6f597c52b12838b2836b5 /libbutl/url.ixx | |
parent | b1cd193f1bd28837a00cbe6629f9a562f99d961f (diff) |
Add basic_url<H,T> class template
Diffstat (limited to 'libbutl/url.ixx')
-rw-r--r-- | libbutl/url.ixx | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/libbutl/url.ixx b/libbutl/url.ixx new file mode 100644 index 0000000..4ff7a06 --- /dev/null +++ b/libbutl/url.ixx @@ -0,0 +1,84 @@ +// file : libbutl/url.ixx -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +LIBBUTL_MODEXPORT namespace butl //@@ MOD Clang needs this for some reason. +{ + template <typename S, typename T> + inline basic_url<S, T>:: + basic_url (scheme_type s, + optional<authority_type> a, + optional<path_type> p, + optional<string_type> q, + optional<string_type> f) + : scheme (std::move (s)), + authority (std::move (a)), + path (std::move (p)), + query (std::move (q)), + fragment (std::move (f)) + { + } + + template <typename S, typename T> + inline basic_url<S, T>:: + basic_url (scheme_type s, + host_type h, + optional<path_type> p, + optional<string_type> q, + optional<string_type> f) + : basic_url (std::move (s), + authority_type {string_type (), std::move (h), 0}, + std::move (p), + std::move (q), + std::move (f)) + { + } + + template <typename S, typename T> + inline basic_url<S, T>:: + basic_url (scheme_type s, + host_type h, + std::uint16_t o, + optional<path_type> p, + optional<string_type> q, + optional<string_type> f) + : basic_url (std::move (s), + authority_type {string_type (), std::move (h), o}, + std::move (p), + std::move (q), + std::move (f)) + { + } + + template <typename S, typename T> + inline basic_url<S, T>:: + basic_url (scheme_type s, + string_type h, + optional<path_type> p, + optional<string_type> q, + optional<string_type> f) + : basic_url (std::move (s), + host_type (std::move (h)), + std::move (p), + std::move (q), + std::move (f)) + { + } + + template <typename S, typename T> + inline basic_url<S, T>:: + basic_url (scheme_type s, + string_type h, + std::uint16_t o, + optional<path_type> p, + optional<string_type> q, + optional<string_type> f) + : basic_url (std::move (s), + host_type (std::move (h)), + o, + std::move (p), + std::move (q), + std::move (f)) + { + } +} |