diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-04-21 07:32:59 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-04-21 07:32:59 +0200 |
commit | 0165fa7178319bb250be1882b3b457232236c820 (patch) | |
tree | de5f295f5695efe5bae0620a598573e0a32e47c3 | |
parent | 1397444e5de3281431d2174564dfd76fe7b7b32f (diff) |
Delete target_key assignment operators since we need tracking references
-rw-r--r-- | build2/target-key | 17 |
1 files 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 |