aboutsummaryrefslogtreecommitdiff
path: root/build2/variable
diff options
context:
space:
mode:
Diffstat (limited to 'build2/variable')
-rw-r--r--build2/variable9
1 files changed, 7 insertions, 2 deletions
diff --git a/build2/variable b/build2/variable
index cc99dc6..9473674 100644
--- a/build2/variable
+++ b/build2/variable
@@ -119,7 +119,7 @@ namespace build2
// value
//
- enum class value_state: uint8_t {null, empty, filled};
+ enum class value_state: uint8_t {null, empty, filled}; // Order is important.
class value
{
@@ -231,10 +231,15 @@ namespace build2
};
// The values should be of the same type (or both be untyped) except NULL
- // values can also be untyped. NULL values compare equal.
+ // values can also be untyped. NULL values compare equal and a NULL value
+ // is always less than a non-NULL.
//
bool operator== (const value&, const value&);
bool operator!= (const value&, const value&);
+ bool operator< (const value&, const value&);
+ bool operator<= (const value&, const value&);
+ bool operator> (const value&, const value&);
+ bool operator>= (const value&, const value&);
// Value cast. The first three expect the value to be not NULL. The cast
// from lookup expects the value to aslo be defined.