Closed h-larsson closed 2 months ago
Building block2 with USE_COMPLEX and gcc 14.1.1 20240522 leads to the following type of error (first instance shown) in integral_compressed.hpp:
USE_COMPLEX
gcc 14.1.1 20240522
integral_compressed.hpp
from block2-preview/src/pybind/core_z/../pybind_core.hpp:30, from block2-preview/src/pybind/core_z/matrix.cpp:21: block2-preview/src/pybind/core_z/../../core/integral_compressed.hpp: In instantiation of ‘FL& block2::CompressedTInt<FL, typename std::enable_if<block2::is_complex<T>::value>::type>::operator()(uint16_t, uint16_t) [with FL = std::complex<double>; typename std::enable_if<block2::is_complex<T>::value>::type = void; uint16_t = short unsigned int]’: lock2-preview/src/pybind/core_z/../../core/integral_compressed.hpp:665:30: required from ‘void block2::CompressedFCIDUMP<FL>::read(const std::string&) [with FL = std::complex<double>; std::string = std::__cxx11::basic_string<char>]’ 665 | cps_ts[0](int_idx[i][0] - 1, int_idx[i][1] - 1) = | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block2-preview/src/pybind/core_z/../../core/integral_compressed.hpp:572:10: required from here 572 | void read(const string &filename) override { | ^~~~ block2-preview/src/pybind/core_z/../../core/integral_compressed.hpp:93:16: error: casting ‘double’ to ‘std::complex<double>&’ does not use ‘constexpr std::complex<double>::complex(double, double)’ [-Werror=cast-user-defined] 93 | return (FL &)((*cps_data)[find_index(i, j) * 2]);
Let me know if you need more information. It works, of course, by removing -Werror as option.
-Werror
Thanks a lot for reporting this problem. Please let me know if it is fixed in https://github.com/block-hczhai/block2-preview/commit/ddd96403b6fdd1c48f8bc4518e304f63012f335c.
Thanks! It compiles now.
Building block2 with
USE_COMPLEX
andgcc 14.1.1 20240522
leads to the following type of error (first instance shown) inintegral_compressed.hpp
:Let me know if you need more information. It works, of course, by removing
-Werror
as option.