-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with installing on Mac #449
Comments
The first one can be resolved by explicit casting.
Can you tell me where it occurs? Here is a related fix |
Here are the whole error messages:
|
#455 fixed the |
with commit 0be640d I still encounter this
|
A solution was given in #461. I am not sure if the change really suppress the error of invalid conversion because I cannot reproduce on CentOS with clang and the online clang compiler either. Someone who has Mac can try to build the code below with clang++ and see if it can be successfully compiled. If it is not passed, there may be a bug in Mac's clang. #include <complex.h>
#include <iostream>
#include <complex>
int main() {
double _Complex c_type_right = 123.4 + 45435.1I;
std::complex<double> cpp_type_right{23, 23};
std::complex<double> left{43.4, 2532.1};
left *= (std::complex<double>)c_type_right;
left *= (std::complex<double>)cpp_type_right;
std::cout << std::complex<float>{c_type_right} << std::endl;
}
|
@IvanaGyro I tried to compile the code
using Apple clang version 15.0.0 (clang-1500.3.9.4); I got the error: complex_example.cpp:10:35: error: implicit conversion from '_Complex double' to 'double' is not permitted in C++ |
It seems that #461 has resolve this issue. |
Which c++ version are we targeting? I would suggest target C++24 (don't use anything that is too new) And If to possible please write the code that could cover most of the compilers ( specifically clang has more restrictions compared to g++, so I suggest to target clang when developing). |
Also. Apple's clang (Apple clang) is different from the typical clang. The behavior is different from the clang one installs on Mac via homebrew....... |
First, I had to add
add_compile_options(-Wno-c++11-narrowing)
into CMakeLists.txt to get rid of this error:But I still have the following error while installing:
I use clang as a compiler.
The text was updated successfully, but these errors were encountered: