This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 2a6848c82c GH-35501: [C++] Fix error C2280 in MSVC (#35683)
2a6848c82c is described below
commit 2a6848c82cfd141ab6ed07a29d24be32b0dede09
Author: June Liu <[email protected]>
AuthorDate: Mon May 22 13:03:44 2023 +0800
GH-35501: [C++] Fix error C2280 in MSVC (#35683)
### Rationale for this change
Arrow failed to build with error C2280 under MSVC cpplatest mode, because
std::basic_string::basic_string(std::nullptr_t) is deleted since C++23. So,
using `std::basic_string::basic_string("")` to replace
`std::basic_string::basic_string(std::nullptr_t)` to fix this issue.
Related issue: #35501
### What changes are included in this PR?
### Are these changes tested?
### Are there any user-facing changes?
* Closes: #35501
Authored-by: June Liu (Beyondsoft Corporation) <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
---
cpp/src/arrow/compute/function_internal.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpp/src/arrow/compute/function_internal.h
b/cpp/src/arrow/compute/function_internal.h
index cbf9d82874..c0dbaac100 100644
--- a/cpp/src/arrow/compute/function_internal.h
+++ b/cpp/src/arrow/compute/function_internal.h
@@ -286,7 +286,7 @@ static inline
Result<decltype(MakeScalar(std::declval<T>()))> GenericToScalar(
template <typename T>
static inline Result<decltype(MakeScalar(std::declval<T>()))> GenericToScalar(
const std::optional<T>& value) {
- return value.has_value() ? MakeScalar(value.value()) : MakeScalar(nullptr);
+ return value.has_value() ? MakeScalar(value.value()) : MakeScalar("");
}
// For Clang/libc++: when iterating through vector<bool>, we can't