aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/target.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-12-16 13:37:09 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-12-16 13:37:09 +0200
commitdab9482b868e2da40d04210c0443bf4d2dcfdfd5 (patch)
tree7d7e95df261433611ed3a954ca9c1f43afe3b7a3 /libbuild2/target.hxx
parent5c3744e914d72916d30c9b4cb4804227d6aae736 (diff)
Verify targets that alias same path are read-only
Diffstat (limited to 'libbuild2/target.hxx')
-rw-r--r--libbuild2/target.hxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/libbuild2/target.hxx b/libbuild2/target.hxx
index c2df3e7..4ce871b 100644
--- a/libbuild2/target.hxx
+++ b/libbuild2/target.hxx
@@ -1489,6 +1489,9 @@ namespace build2
iterator begin () const {return map_.begin ();}
iterator end () const {return map_.end ();}
+ size_t
+ size () const {return map_.size ();}
+
void
clear () {map_.clear ();}
@@ -1601,6 +1604,8 @@ namespace build2
using path_type = build2::path;
+ // Target path. Must be absolute and normalized.
+ //
// Target path is an "atomic consistent cash". That is, it can be set at
// any time (including on a const instance) but any subsequent updates
// must set the same path. Or, in other words, once the path is set, it
@@ -1630,7 +1635,7 @@ namespace build2
// the path_mtime() function to do it in the correct order.
//
const path_type&
- path () const;
+ path (memory_order = memory_order_acquire) const;
const path_type&
path (path_type) const;