ASF GitHub Bot commented on PARQUET-1267:

rip-nsk commented on issue #451: PARQUET-1267: [C++] replace "unsafe" 
std::equal by std::memcmp
URL: https://github.com/apache/parquet-cpp/pull/451#issuecomment-379624958
   std::memcmp is not safer, it just requires the same size arguments.
   std::equal has (implicitly) the same requirements, but since c++14 
introduces a more secure version, this one is marked as deprecate.
   Both variants are valid (since we check size of arrays first).
   Anyway, memcmp is more suitable here - we're comparing byte (not object) 
arrays, code for FLBA uses it also - 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

> replace "unsafe" std::equal by std::memcmp
> ------------------------------------------
>                 Key: PARQUET-1267
>                 URL: https://issues.apache.org/jira/browse/PARQUET-1267
>             Project: Parquet
>          Issue Type: Improvement
>          Components: parquet-cpp
>            Reporter: rip.nsk
>            Priority: Trivial
> std::equal(first1, last1, first2, size) is considered unsafe by msvc, replace 
> it by std::memcmp

This message was sent by Atlassian JIRA

Reply via email to