Skip to content

[C++][C++23][Gandiva] cpp/src/gandiva/cache.h:54:35: error: use of deleted function #47317

@kou

Description

@kou

Describe the enhancement requested

https://github.com/apache/arrow/actions/runs/16921264431/job/47947717334#step:6:6826

FAILED: src/gandiva/CMakeFiles/gandiva-internals-test.dir/cache_test.cc.o 
/usr/bin/ccache /usr/bin/c++ -DARROW_HAVE_RUNTIME_AVX2 -DARROW_HAVE_RUNTIME_AVX512 -DARROW_HAVE_RUNTIME_BMI2 -DARROW_HAVE_RUNTIME_SSE4_2 -DARROW_HAVE_SSE4_2 -DGANDIVA_EXTENSION_TEST_DIR=\"/build/cpp/src/gandiva/tests/external_functions\" -I/build/cpp/src -I/arrow/cpp/src -I/arrow/cpp/src/generated -isystem /usr/lib/llvm-18/include -Wredundant-move -Wno-noexcept-type  -fdiagnostics-color=always  -Wall -Wno-conversion -Wno-sign-conversion -Wdate-time -Wimplicit-fallthrough -Wunused-result -fno-semantic-interposition -msse4.2  -g -Werror -O0 -ggdb -g1 -fPIE -DGTEST_HAS_PTHREAD=1 -std=c++23 -MD -MT src/gandiva/CMakeFiles/gandiva-internals-test.dir/cache_test.cc.o -MF src/gandiva/CMakeFiles/gandiva-internals-test.dir/cache_test.cc.o.d -o src/gandiva/CMakeFiles/gandiva-internals-test.dir/cache_test.cc.o -c /arrow/cpp/src/gandiva/cache_test.cc
In file included from /arrow/cpp/src/gandiva/cache_test.cc:18:
/arrow/cpp/src/gandiva/cache.h: In instantiation of 'ValueType gandiva::Cache<KeyType, ValueType>::GetObjectCode(const KeyType&) [with KeyType = gandiva::TestCacheKey; ValueType = std::__cxx11::basic_string<char>]':
/arrow/cpp/src/gandiva/cache_test.cc:41:3:   required from here
/arrow/cpp/src/gandiva/cache.h:54:35: error: use of deleted function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::nullptr_t = std::nullptr_t]'
   54 |     return result != std::nullopt ? *result : nullptr;
      |            ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/12/string:53,
                 from /usr/include/c++/12/stdexcept:39,
                 from /usr/include/c++/12/system_error:41,
                 from /usr/include/c++/12/mutex:41,
                 from /arrow/cpp/src/gandiva/cache.h:21:
/usr/include/c++/12/bits/basic_string.h:734:7: note: declared here
  734 |       basic_string(nullptr_t) = delete;
      |       ^~~~~~~~~~~~

Component(s)

C++, Gandiva

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions