From 26a42f71564fb97d5dba924f681e70fedcf6af46 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 21 Sep 2015 14:14:08 +0200 Subject: Expand and clarify empty repository_location --- bpkg/manifest | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'bpkg/manifest') diff --git a/bpkg/manifest b/bpkg/manifest index 35ff650..47b8d76 100644 --- a/bpkg/manifest +++ b/bpkg/manifest @@ -321,20 +321,24 @@ namespace bpkg // repository_location () = default; - // Creates remote/absolute repository location. Throws invalid_argument - // if the location is a relative path. + // If the argument is not empty, creates remote/absolute repository + // location. Throws invalid_argument if the location is a relative + // path. If the argument is empty, then creates the special empty + // location. // explicit repository_location (const std::string&); // Creates a potentially relative repository location. If base is not // empty, use it to complete the relative location to remote/absolute. - // Throws invalid_argument if base itself is relative or the resulting - // completed location is invalid. + // Throws invalid_argument if base is not empty but the location is + // empty, base itself is relative, or the resulting completed location + // is invalid. // repository_location (const std::string&, const repository_location& base); - // Note that relative locations have no canonical name. + // Note that relative locations have no canonical name. Canonical + // name of an empty location is the empty name. // const std::string& canonical_name () const noexcept {return canonical_name_;} @@ -409,9 +413,10 @@ namespace bpkg return port_; } - // Note that this is not necessarily syntactically the same - // string as what was used to initialize this location. But - // it should be semantically equivalent. + // Note that this is not necessarily syntactically the same string + // as what was used to initialize this location. But it should be + // semantically equivalent. String representation of an empty + // location is the empty string. // std::string string () const; -- cgit v1.1