Skip to content

Commit

Permalink
ifdef it instead
Browse files Browse the repository at this point in the history
  • Loading branch information
lidavidm committed Oct 15, 2024
1 parent e95fc02 commit 5b50a1c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/nanoarrow/nanoarrow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,16 @@ namespace literals {
/// @{

/// \brief User literal operator allowing ArrowStringView construction like "str"_asv
#if !defined(__clang__) && (defined(__GNUC__) && __GNUC__ < 6)
inline ArrowStringView operator"" _asv(const char* data, std::size_t size_bytes) {
return {data, static_cast<int64_t>(size_bytes)};
}
#else
inline ArrowStringView operator""_asv(const char* data, std::size_t size_bytes) {
return {data, static_cast<int64_t>(size_bytes)};
}
#endif
// N.B. older GCC requires the space above, newer Clang forbids the space

// @}

Expand Down

0 comments on commit 5b50a1c

Please sign in to comment.