From ce1399d1610771c5ecca49586dccd89e00427515 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 29 May 2019 19:02:06 +0300 Subject: Inherit url type from butl::url --- libbpkg/manifest.hxx | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'libbpkg/manifest.hxx') diff --git a/libbpkg/manifest.hxx b/libbpkg/manifest.hxx index 59c0ba0..01ffa49 100644 --- a/libbpkg/manifest.hxx +++ b/libbpkg/manifest.hxx @@ -250,16 +250,29 @@ namespace bpkg }; // url + // doc-url + // src-url // package-url // - class url: public std::string + // URL that has the following constraints: + // + // - is not rootless + // - is not local (the scheme is not `file`) + // - authority is present and is not empty + // + // See libbutl/url.mxx for details. + // + class url: public butl::url { public: std::string comment; + // Throw invalid_argument on parsing or constraints checking error. + // explicit - url (std::string u = "", std::string c = "") - : std::string (std::move (u)), comment (std::move (c)) {} + url (const std::string& u, std::string c = ""); + + url () = default; }; // email -- cgit v1.1