You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the bazel log, DecimalUtil.h:365 line calls std::to_chars with input parameter type (char*&, char*, facebook::velox::uint128_t&)
using uint128_t = __uint128_t;
I looked up https://en.cppreference.com/w/cpp/utility/to_chars
and found that the third argument to std::to_chars does not support __uint128_t, which also means that implicit type conversion occurs, but too many convertible types leads to mutation errors, and both 10.2 and 11.2 compile with errors, which is as expected, since neither of the charconv files has an overload for __uint128_t, as opposed to the cppreference documentation.
How should the code here compile through?
System information
tlinux is centos-compatible.
Velox System Info v0.0.2
Commit: eaff500
CMake Version: 2.8.12
System: Linux-3.10.107-1-tlinux2_kvm_guest-0056
Arch: x86_64
C++ Compiler: /opt/rh/devtoolset-10/root/usr/bin/c++
C++ Compiler Version: 10.2.1
C Compiler: /opt/rh/devtoolset-10/root/usr/bin/cc
C Compiler Version: 10.2.1
CMake Prefix Path: /usr/local;/usr;/;/usr;/usr/local
CMake log
In file included from external/velox/velox/type/DecimalUtil.cpp:17:
external/velox/velox/type/DecimalUtil.h: In static member function'static size_t facebook::velox::DecimalUtil::castToString(T, int32_t, int32_t, char*)':external/velox/velox/type/DecimalUtil.h:366:75: error: call of overloaded 'to_chars(char*&, char*, facebook::velox::uint128_t&)' is ambiguous 366 | std::to_chars(writePosition, writePosition + maxSize, fraction); | ^In file included from external/velox/velox/type/DecimalUtil.h:19, from external/velox/velox/type/DecimalUtil.cpp:17:/opt/rh/devtoolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/charconv:366:1: note: candidate: 'std::to_chars_result std::to_chars(char*, char*, char, int)' 366 | _GLIBCXX_TO_CHARS(char) | ^~~~~~~~~~~~~~~~~/opt/rh/devtoolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/charconv:367:1: note: candidate: 'std::to_chars_result std::to_chars(char*, char*, signed char, int)' 367 | _GLIBCXX_TO_CHARS(signed char) | ^~~~~~~~~~~~~~~~~/opt/rh/devtoolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/charconv:368:1: note: candidate: 'std::to_chars_result std::to_chars(char*, char*, unsigned char, int)' 368 | _GLIBCXX_TO_CHARS(unsigned char) | ^~~~~~~~~~~~~~~~~/opt/rh/devtoolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/charconv:369:1: note: candidate: 'std::to_chars_result std::to_chars(char*, char*, short int, int)' 369 | _GLIBCXX_TO_CHARS(signed short) | ^~~~~~~~~~~~~~~~~/opt/rh/devtoolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/charconv:370:1: note: candidate: 'std::to_chars_result std::to_chars(char*, char*, short unsigned int, int)' 370 | _GLIBCXX_TO_CHARS(unsigned short) | ^~~~~~~~~~~~~~~~~/opt/rh/devtoolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/charconv:371:1: note: candidate: 'std::to_chars_result std::to_chars(char*, char*, int, int)' 371 | _GLIBCXX_TO_CHARS(signed int) | ^~~~~~~~~~~~~~~~~/opt/rh/devtoolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/charconv:372:1: note: candidate: 'std::to_chars_result std::to_chars(char*, char*, unsigned int, int)' 372 | _GLIBCXX_TO_CHARS(unsigned int) | ^~~~~~~~~~~~~~~~~/opt/rh/devtoolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/charconv:373:1: note: candidate: 'std::to_chars_result std::to_chars(char*, char*, long int, int)' 373 | _GLIBCXX_TO_CHARS(signed long) | ^~~~~~~~~~~~~~~~~/opt/rh/devtoolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/charconv:374:1: note: candidate: 'std::to_chars_result std::to_chars(char*, char*, long unsigned int, int)' 374 | _GLIBCXX_TO_CHARS(unsigned long) | ^~~~~~~~~~~~~~~~~/opt/rh/devtoolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/charconv:375:1: note: candidate: 'std::to_chars_result std::to_chars(char*, char*, long long int, int)' 375 | _GLIBCXX_TO_CHARS(signed long long) | ^~~~~~~~~~~~~~~~~/opt/rh/devtoolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/charconv:376:1: note: candidate: 'std::to_chars_result std::to_chars(char*, char*, long long unsigned int, int)' 376 | _GLIBCXX_TO_CHARS(unsigned long long) | ^~~~~~~~~~~~~~~~~/opt/rh/devtoolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/charconv:397:19: note: candidate: 'std::to_chars_result std::to_chars(char*, char*, bool, int)' (deleted) 397 | to_chars_result to_chars(char*, char*, bool, int = 10) = delete; | ^~~~~~~~external/velox/velox/type/DecimalUtil.cpp: In static member function 'static int32_t facebook::velox::DecimalUtil::toByteArray(facebook::velox::int128_t, char*)':external/velox/velox/type/DecimalUtil.cpp:81:14: warning: comparison of integer expressions of different signedness: 'int32_t' {aka 'int'} and 'long unsigned int' [-Wsign-compare] 81 | if (length <= sizeof(int64_t)) {
The text was updated successfully, but these errors were encountered:
Problem description
I tried to compile velox using bazel(3.7.1).
From the bazel log, DecimalUtil.h:365 line calls std::to_chars with input parameter type (char*&, char*, facebook::velox::uint128_t&)
using uint128_t = __uint128_t;
I looked up https://en.cppreference.com/w/cpp/utility/to_chars
and found that the third argument to std::to_chars does not support __uint128_t, which also means that implicit type conversion occurs, but too many convertible types leads to mutation errors, and both 10.2 and 11.2 compile with errors, which is as expected, since neither of the charconv files has an overload for __uint128_t, as opposed to the cppreference documentation.
How should the code here compile through?
System information
tlinux is centos-compatible.
Velox System Info v0.0.2
Commit: eaff500
CMake Version: 2.8.12
System: Linux-3.10.107-1-tlinux2_kvm_guest-0056
Arch: x86_64
C++ Compiler: /opt/rh/devtoolset-10/root/usr/bin/c++
C++ Compiler Version: 10.2.1
C Compiler: /opt/rh/devtoolset-10/root/usr/bin/cc
C Compiler Version: 10.2.1
CMake Prefix Path: /usr/local;/usr;/;/usr;/usr/local
CMake log
The text was updated successfully, but these errors were encountered: