Skip to content

Commit

Permalink
Marked misc. move constructors noexcept.
Browse files Browse the repository at this point in the history
Marked constructors for both hash and hashCollection noexcept for move compatibility for some STL containers such as vector.
  • Loading branch information
D7EAD authored Nov 24, 2022
1 parent aed9b40 commit f06e034
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/hashpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1993,8 +1993,8 @@ namespace hashpp {

class hashCollection {
public:
hashCollection(const std::vector<std::pair<std::string, std::vector<std::string>>>& data) : collection(data) {}
hashCollection(std::vector<std::pair<std::string, std::vector<std::string>>>&& data) : collection(std::move(data)) {}
hashCollection(const std::vector<std::pair<std::string, std::vector<std::string>>>& data) noexcept : collection(data) {}
hashCollection(std::vector<std::pair<std::string, std::vector<std::string>>>&& data) noexcept : collection(std::move(data)) {}

// operator[] overload to access collections of hashpp
// by their specific algorithm
Expand Down

0 comments on commit f06e034

Please sign in to comment.