apache / arrow-nanoarrow

Helpers for Arrow C Data & Arrow C Stream interfaces
https://arrow.apache.org/nanoarrow
Apache License 2.0
149 stars 34 forks source link

Some nanoarrow.hpp content is not compatible with gcc 4.8 #462

Closed paleolimbot closed 1 month ago

paleolimbot commented 1 month ago

Thankfully gcc 4.8 will be out of common usage soon; however, we in theory still support it and some content of nanoarrow.hpp results in compile errors there:

  Scanning dependencies of target nanoarrow_c_data_integration
  [ 25%] Building CXX object CMakeFiles/nanoarrow_c_data_integration.dir/src/nanoarrow/integration/c_data_integration.cc.o
  In file included from /nanoarrow/src/nanoarrow/nanoarrow_testing.hpp:27:0,
                   from /nanoarrow/src/nanoarrow/integration/c_data_integration.cc:24:
  /nanoarrow/src/nanoarrow/nanoarrow.hpp:578:17: error: ‘is_trivially_copyable’ is not a member of ‘std’
     static_assert(std::is_trivially_copyable<T>::value, "");
                   ^
  /nanoarrow/src/nanoarrow/nanoarrow.hpp:578:45: error: expected primary-expression before ‘>’ token
     static_assert(std::is_trivially_copyable<T>::value, "");
                                               ^
  /nanoarrow/src/nanoarrow/nanoarrow.hpp:578:46: error: ‘::value’ has not been declared
     static_assert(std::is_trivially_copyable<T>::value, "");
                                                ^
  /nanoarrow/src/nanoarrow/nanoarrow.hpp:908:24: error: missing space between ‘""’ and suffix identifier
   inline ArrowStringView operator""_v(const char* data, std::size_t size_bytes) {
                          ^
  /nanoarrow/src/nanoarrow/nanoarrow.hpp: In instantiation of ‘nanoarrow::internal::Maybe<T>::Maybe(T) [with T = ArrowStringView]’:
  /nanoarrow/src/nanoarrow/nanoarrow.hpp:778:65:   required from here
  /nanoarrow/src/nanoarrow/nanoarrow.hpp:563:50: error: cannot convert ‘ArrowStringView’ to ‘const char*’ in initialization
         : something_{something}, is_something_{true} {}
                                                    ^
  /nanoarrow/src/nanoarrow/nanoarrow.hpp: In instantiation of ‘nanoarrow::internal::InputRange<Next>::iterator nanoarrow::internal::InputRange<Next>::end() [with Next = nanoarrow::ViewArrayStream::Next]’:
  /nanoarrow/src/nanoarrow/nanoarrow.hpp:877:38:   required from here
  /nanoarrow/src/nanoarrow/nanoarrow.hpp:634:36: error: could not convert ‘{this, <brace-enclosed initializer list>()}’ from ‘<brace-enclosed initializer list>’ to ‘nanoarrow::internal::InputRange<nanoarrow::ViewArrayStream::Next>::iterator’
     iterator end() { return {this, {}}; }
                                      ^
  /nanoarrow/src/nanoarrow/nanoarrow.hpp: In instantiation of ‘nanoarrow::internal::Maybe<T>::Maybe() [with T = ArrowStringView]’:
  /nanoarrow/src/nanoarrow/nanoarrow.hpp:560:26:   required from ‘nanoarrow::internal::Maybe<T>::Maybe(nanoarrow::internal::Nothing) [with T = ArrowStringView]’
  /nanoarrow/src/nanoarrow/nanoarrow.hpp:780:14:   required from here
  /nanoarrow/src/nanoarrow/nanoarrow.hpp:559:53: error: too many initializers for ‘nanoarrow::internal::Nothing’
     Maybe() : nothing_{Nothing{}}, is_something_{false} {}
                                                       ^
  gmake[2]: *** [CMakeFiles/nanoarrow_c_data_integration.dir/src/nanoarrow/integration/c_data_integration.cc.o] Error 1
  gmake[1]: *** [CMakeFiles/nanoarrow_c_data_integration.dir/all] Error 2
  gmake: *** [all] Error 2
  Failed to verify release candidate. See /tmp/nanoarrow-HEAD.YCAh0T for details.