Don't throw compilation error when NO_ASSERT is used.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-04-22 12:02:00 +02:00
parent 91b9854932
commit 479a240c6f
2 changed files with 3 additions and 1 deletions

View File

@@ -20,7 +20,7 @@ namespace Arbutils::Collections {
}
inline void Insert(const KeyT& key, const ValueT& value) {
auto v = _map.insert({key, value});
[[maybe_unused]] auto v = _map.insert({key, value});
#ifndef NO_ASSERT
if (!v.second)
throw std::logic_error("Key already exists");