aboutsummaryrefslogtreecommitdiff
path: root/libbpkg/manifest.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbpkg/manifest.hxx')
-rw-r--r--libbpkg/manifest.hxx19
1 files changed, 16 insertions, 3 deletions
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