diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/tag.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/tag.h b/include/tag.h index 63125f1dc5..75a41f2e1f 100644 --- a/include/tag.h +++ b/include/tag.h @@ -55,6 +55,7 @@ public: ///Returns the type of the tag virtual tag_type get_type() const noexcept = 0; + //Polymorphic clone methods virtual std::unique_ptr<tag> clone() const& = 0; virtual std::unique_ptr<tag> move_clone() && = 0; std::unique_ptr<tag> clone() &&; @@ -65,6 +66,12 @@ public: */ virtual tag& assign(tag&& rhs) = 0; + /** + * @brief Default-constructs a new tag of the given type + * @throw std::invalid_argument if the type is not valid (e.g. End or Null) + */ + static std::unique_ptr<tag> create(tag_type type); + friend bool operator==(const tag& lhs, const tag& rhs); friend bool operator!=(const tag& lhs, const tag& rhs); |
