diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-11-08 00:17:11 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-11-11 17:39:25 +0300 |
commit | fa313152767ae60941987450268f9562e1d59d42 (patch) | |
tree | bebc5c315c8c394f064f47067915812b177e4d7d /libbutl/path.ixx | |
parent | 23d4deb111bfff9c282c20989573c4b0775e4c16 (diff) |
Add path_name_value struct
Diffstat (limited to 'libbutl/path.ixx')
-rw-r--r-- | libbutl/path.ixx | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/libbutl/path.ixx b/libbutl/path.ixx index 7786fbc..ae19b58 100644 --- a/libbutl/path.ixx +++ b/libbutl/path.ixx @@ -701,4 +701,42 @@ LIBBUTL_MODEXPORT namespace butl //@@ MOD Clang needs this for some reason. if (!d.path_.empty () && d.tsep_ == 0) d.tsep_ = 1; // Canonical separator is always first. } + + // basic_path_name_value + // + template <typename P> + inline basic_path_name_value<P>:: + basic_path_name_value (basic_path_name_value&& p) + : basic_path_name_value (std::move (p.path_), std::move (p.name)) + { + } + + template <typename P> + inline basic_path_name_value<P>:: + basic_path_name_value (const basic_path_name_value& p) + : basic_path_name_value (p.path_, p.name) + { + } + + template <typename P> + inline basic_path_name_value<P>& basic_path_name_value<P>:: + operator= (basic_path_name_value&& p) + { + if (this != &p) + { + path_ = std::move (p.path_); + this->name = std::move (p.name); + } + } + + template <typename P> + inline basic_path_name_value<P>& basic_path_name_value<P>:: + operator= (const basic_path_name_value& p) + { + if (this != &p) + { + path_ = p.path_; + this->name = p.name; + } + } } |