AlexanderSaydakov commented on a change in pull request #186:
URL: https://github.com/apache/datasketches-cpp/pull/186#discussion_r574004021
##########
File path: hll/include/HllSketchImplFactory.hpp
##########
@@ -157,8 +159,9 @@ Hll6Array<A>* HllSketchImplFactory<A>::convertToHll6(const
HllArray<A>& srcHllAr
template<typename A>
Hll8Array<A>* HllSketchImplFactory<A>::convertToHll8(const HllArray<A>&
srcHllArr) {
const int lgConfigK = srcHllArr.getLgConfigK();
- typedef typename std::allocator_traits<A>::template
rebind_alloc<Hll8Array<A>> hll8Alloc;
- Hll8Array<A>* hll8Array = new (hll8Alloc().allocate(1))
Hll8Array<A>(lgConfigK, srcHllArr.isStartFullSize());
+ using Hll8Alloc = typename std::allocator_traits<A>::template
rebind_alloc<Hll8Array<A>>;
+ Hll8Array<A>* hll8Array = new
(Hll8Alloc(srcHllArr.getAllocator()).allocate(1))
Review comment:
I prefer not to create aliases without a good reason.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]