From 0165fa7178319bb250be1882b3b457232236c820 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 21 Apr 2016 07:32:59 +0200 Subject: Delete target_key assignment operators since we need tracking references --- build2/target-key | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/build2/target-key b/build2/target-key index c911a1f..df589d7 100644 --- a/build2/target-key +++ b/build2/target-key @@ -22,11 +22,22 @@ namespace build2 class target_key { public: - const target_type* const type; + const target_type* const type; const dir_path* const dir; // Can be relative if part of prerequisite_key. const dir_path* const out; // Can be relative if part of prerequisite_key. - const string* const name; - const string* const& ext; //@@ Iffy, whan happens when move/copy? + const string* const name; + const string* const& ext; + + // The above references have to track the original objects so we cannot + // have assignment. + // + // @@ We could use references for all members, not just ext. + // + target_key (target_key&&) = default; + target_key (const target_key&) = default; + + target_key& operator= (target_key&&) = delete; + target_key& operator= (const target_key&) = delete; }; inline bool -- cgit v1.1