From fa313152767ae60941987450268f9562e1d59d42 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 8 Nov 2019 00:17:11 +0300 Subject: Add path_name_value struct --- libbutl/path.ixx | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'libbutl/path.ixx') 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 + inline basic_path_name_value

:: + basic_path_name_value (basic_path_name_value&& p) + : basic_path_name_value (std::move (p.path_), std::move (p.name)) + { + } + + template + inline basic_path_name_value

:: + basic_path_name_value (const basic_path_name_value& p) + : basic_path_name_value (p.path_, p.name) + { + } + + template + inline basic_path_name_value

& basic_path_name_value

:: + operator= (basic_path_name_value&& p) + { + if (this != &p) + { + path_ = std::move (p.path_); + this->name = std::move (p.name); + } + } + + template + inline basic_path_name_value

& basic_path_name_value

:: + operator= (const basic_path_name_value& p) + { + if (this != &p) + { + path_ = p.path_; + this->name = p.name; + } + } } -- cgit v1.1