diff options
Diffstat (limited to 'lib/notion.h')
-rw-r--r-- | lib/notion.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/notion.h b/lib/notion.h index 69f5cef..5388e17 100644 --- a/lib/notion.h +++ b/lib/notion.h | |||
@@ -119,9 +119,24 @@ namespace verbly { | |||
119 | 119 | ||
120 | operator filter() const | 120 | operator filter() const |
121 | { | 121 | { |
122 | if (!valid_) | ||
123 | { | ||
124 | throw std::domain_error("Bad access to uninitialized notion"); | ||
125 | } | ||
126 | |||
122 | return (id == id_); | 127 | return (id == id_); |
123 | } | 128 | } |
124 | 129 | ||
130 | filter operator!() const | ||
131 | { | ||
132 | if (!valid_) | ||
133 | { | ||
134 | throw std::domain_error("Bad access to uninitialized notion"); | ||
135 | } | ||
136 | |||
137 | return (id != id_); | ||
138 | } | ||
139 | |||
125 | // Relationships with other objects | 140 | // Relationships with other objects |
126 | 141 | ||
127 | static const field words; | 142 | static const field words; |