Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cpp/src/arrow/util/secure_string_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,14 @@ namespace arrow::util::test {
# define CAN_TEST_DEALLOCATED_AREAS 1
#endif

// Reading the unused tail past size() is undefined behavior, exclude MSVC
// from the tail check.
std::string_view StringArea(const std::string& string) {
#if defined(_MSC_VER)
return {string.data(), string.size()};
#else
return {string.data(), string.capacity()};
#endif
}

// same as GTest ASSERT_PRED_FORMAT2 macro, but without the outer GTEST_ASSERT_
Expand Down
Loading