Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion include/siphash-hpp/siphash.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
#include <type_traits>
#include <utility>

#if __cplusplus >= 201703L
#define SIPHASH_NODISCARD [[nodiscard]]
#else
#define SIPHASH_NODISCARD
#endif

#if __cplusplus < 201703L
namespace std {
template <class...>
Expand Down Expand Up @@ -280,7 +286,7 @@ namespace siphash_hpp {
return update(data.data(), data.size());
}

const uint64_t digest() noexcept {
SIPHASH_NODISCARD const uint64_t digest() noexcept {
while (index < 7) ++index;
m |= (input_len << (index * 8));
digest_block();
Expand Down
Loading