From b59bec36b7eca72d289bf44d3b59ef3085521f54 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Sat, 10 Feb 2024 08:29:55 +0900 Subject: [PATCH] GH-40009: [C++] Add missing "#include " (#40010) ### Rationale for this change `std::find()` is defined in ``. If we don't include `` explicitly, g++-14 complains: cpp/src/arrow/filesystem/util_internal.cc: In function 'arrow::Result > arrow::fs::internal::PathFromUriHelper(const std::string&, std::vector >, bool, AuthorityHandlingBehavior)': cpp/src/arrow/filesystem/util_internal.cc:143:16: error: no matching function for call to 'find(std::vector >::iterator, std::vector >::iterator, const std::__cxx11::basic_string&)' 143 | if (std::find(supported_schemes.begin(), supported_schemes.end(), scheme) == | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template typename __gnu_cxx::__enable_if::__value, std::istreambuf_iterator<_CharT, std::char_traits<_CharT> > >::__type std::find(istreambuf_iterator<_CharT, char_traits<_CharT> >, istreambuf_iterator<_CharT, char_traits<_CharT> >, const _CharT2&)' 435 | find(istreambuf_iterator<_CharT> __first, | ^~~~ /usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: template argument deduction/substitution failed: cpp/src/arrow/filesystem/util_internal.cc:143:16: note: '__gnu_cxx::__normal_iterator*, std::vector > >' is not derived from 'std::istreambuf_iterator<_CharT, std::char_traits<_CharT> >' 143 | if (std::find(supported_schemes.begin(), supported_schemes.end(), scheme) == | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ### What changes are included in this PR? Include `` explicitly. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * Closes: #40009 Authored-by: Sutou Kouhei Signed-off-by: Jacob Wujciak-Jens --- cpp/src/arrow/filesystem/util_internal.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/src/arrow/filesystem/util_internal.cc b/cpp/src/arrow/filesystem/util_internal.cc index 1ca5af27fc895..13f43d45db6c1 100644 --- a/cpp/src/arrow/filesystem/util_internal.cc +++ b/cpp/src/arrow/filesystem/util_internal.cc @@ -17,6 +17,7 @@ #include "arrow/filesystem/util_internal.h" +#include #include #include "arrow/buffer.h"