diff options
Diffstat (limited to 'libbuild2/action.hxx')
-rw-r--r-- | libbuild2/action.hxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libbuild2/action.hxx b/libbuild2/action.hxx index 5898ba8..906d7eb 100644 --- a/libbuild2/action.hxx +++ b/libbuild2/action.hxx @@ -61,6 +61,8 @@ namespace build2 { action (): inner_id (0), outer_id (0) {} // Invalid action. + action (action_id a): action (a >> 4, a & 0xF) {} + // If this is not a nested operation, then outer should be 0. // action (meta_operation_id m, operation_id inner, operation_id outer = 0) @@ -103,6 +105,11 @@ namespace build2 inline bool operator!= (action x, action y) {return !(x == y);} + inline bool operator== (action x, action_id y) {return x == action (y);} + inline bool operator!= (action x, action_id y) {return x != action (y);} + inline bool operator== (action_id x, action y) {return action (x) == y;} + inline bool operator!= (action_id x, action y) {return action (x) == y;} + bool operator> (action, action) = delete; bool operator< (action, action) = delete; bool operator>= (action, action) = delete; |