Copilot commented on code in PR #537:
URL: https://github.com/apache/datasketches-cpp/pull/537#discussion_r4174458321


##########
tuple/include/array_tuple_sketch.hpp:
##########
@@ -36,32 +34,27 @@ class array {
 public:
   using value_type = T;
   using allocator_type = Allocator;
-  using alloc_traits = std::allocator_traits<Allocator>;
 
-  explicit array(uint8_t size, const T& value, const Allocator& allocator = 
Allocator()):
+  explicit array(uint8_t size, T value, const Allocator& allocator = 
Allocator()):
   allocator_(allocator), size_(size), array_(allocator_.allocate(size_)) {
-    init_values(value, std::is_trivially_copyable<T>());
+    std::fill(array_, array_ + size_, value);

Review Comment:
   `std::fill` (and the copy constructor's `std::copy`) is declared by 
`<algorithm>`, but this patch removes that direct include. The public header 
can therefore fail when included by a translation unit whose other headers do 
not expose those names transitively; keep `<algorithm>` even though the 
string-specific support is being reverted.
   
   This issue also appears in the following locations of the same file:
   - line 54
   - line 77



-- 
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