AlexanderSaydakov commented on code in PR #458:
URL: https://github.com/apache/datasketches-cpp/pull/458#discussion_r2140682575


##########
tdigest/include/tdigest_impl.hpp:
##########
@@ -638,11 +656,11 @@ template <typename T, typename A>
 }
 
 template<typename T, typename A>
-tdigest<T, A>::const_iterator::const_iterator(const tdigest& tdigest_, const 
bool is_end):
-  centroids_()
+tdigest<T, A>::const_iterator::const_iterator(const tdigest<T, A>& tdigest_, 
const bool is_end):
+  centroids_(tdigest_.get_allocator())
 {
   // Create a copy of the tdigest to generate the centroids after processing 
the buffered values
-  tdigest tmp(tdigest_);
+  tdigest<T, A> tmp(tdigest_);

Review Comment:
   These template parameters are implied, and we tried to be consistent in 
omitting them. On the other hand, I think I was wrong with my previous comment 
about this copy when I said it should support allocator. Now I think that the 
implicit copy should do the right thing.
   It would be nice to test compliance to the AllocatorAwareContainer, but I 
would think it is outside of the scope of this PR.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to