Check that Redirect is not passed to exchange()
[junction.git] / junction / ConcurrentMap_Linear.h
index 3450807..b93d86e 100644 (file)
@@ -135,6 +135,7 @@ public:
 
         Value exchangeValue(Value desired) {
             TURF_ASSERT(desired != Value(ValueTraits::NullValue));
+            TURF_ASSERT(desired != Value(ValueTraits::Redirect));
             TURF_ASSERT(m_cell); // Cell must have been found or inserted
             TURF_TRACE(ConcurrentMap_Linear, 4, "[Mutator::exchangeValue] called", uptr(m_table), uptr(m_value));
             bool mustDouble = false;