diff options
| author | ljfa-ag <ljfa-ag@web.de> | 2015-07-07 16:55:04 +0200 |
|---|---|---|
| committer | ljfa-ag <ljfa-ag@web.de> | 2015-07-07 16:55:04 +0200 |
| commit | 4ea7019e8594254b77b72ea66e7700b2d8e6d2ef (patch) | |
| tree | f3ae92abde9706f2e007e8420650db4ca8c798ba | |
| parent | b539b098290f15d321087d48cd93b7bf837f00a4 (diff) | |
| download | Project-Tick-4ea7019e8594254b77b72ea66e7700b2d8e6d2ef.tar.gz Project-Tick-4ea7019e8594254b77b72ea66e7700b2d8e6d2ef.zip | |
Specify undefined behavior on null values
| -rw-r--r-- | include/value.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/value.h b/include/value.h index c029e1ecad..7d3dfc0e92 100644 --- a/include/value.h +++ b/include/value.h @@ -54,6 +54,11 @@ public: void set(tag&& t); //Conversion to tag + /** + * @brief Returns the contained tag + * + * If the value is uninitialized, the behavior is undefined. + */ operator tag&(); operator const tag&() const; tag& get(); @@ -94,6 +99,8 @@ public: /** * @brief Returns the contained string if the type is tag_string + * + * If the value is uninitialized, the behavior is undefined. * @throw std::bad_cast if the tag type is not tag_string */ operator const std::string&() const; @@ -103,6 +110,8 @@ public: /** * @brief In case of a tag_compound, accesses a tag by key with bounds checking + * + * If the value is uninitialized, the behavior is undefined. * @throw std::bad_cast if the tag type is not tag_compound * @throw std::out_of_range if given key does not exist * @sa tag_compound::at @@ -112,6 +121,8 @@ public: /** * @brief In case of a tag_compound, accesses a tag by key + * + * If the value is uninitialized, the behavior is undefined. * @sa tag_compound::operator[] */ value& operator[](const std::string& key); |
