-
Notifications
You must be signed in to change notification settings - Fork 95
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
OSX catalina GCC macports #79
Comments
still, what compiler do you use? because in the subject I can see |
I can't confirm this issue using gcc-9.2.1 on linux. |
also, please compile and execute this code using the same compiler: #include <iostream>
template<typename ...Types>
void foo(Types ...) { std::cout << __PRETTY_FUNCTION__ << std::endl; }
int main() {
foo(std::int64_t{}, std::uint64_t{}, std::size_t{});
} and show me the output. |
Clang compiles fine the test code: $ g++ -std=c++11 test.cpp -o test but with gcc: export CC=/opt/local/bin/gcc-mp-9;export CXX=/opt/local/bin/g++-mp-9 $$CXX -std=c++11 test.cpp -o test Looks like this problem: I tried both, first the clang but it errors out earlier, so I switched to gcc.
|
in the topic you write about one error, but now you write about another... how many members in the YAS_OBJECT() in the last paste? |
|
|
I have this:
... I've resolved the issue with missing wchar.h so the test program compiles fine under both gcc and clang. |
please attach this output as file, not as copy-paste |
there are two different errors for different compilers. please compile, execute and show me the output for this code: #include <iostream>
template<typename ...Types>
void foo(Types ...) { std::cout << __PRETTY_FUNCTION__ << std::endl; }
int main() {
foo(std::int64_t{}, std::uint64_t{}, std::size_t{});
} |
|
please change this line to |
and this line the same way please. |
please replace |
With that it builds now with gcc. With clang I attached the log if you're interested. |
please add the |
There is no main.ii, here is the log. |
it should be in the cmake's build directory |
The issue began here: CMAKE_CXX_COMPILER_ID="AppleClang" So I changed to: if(CMAKE_CXX_COMPILER_ID MATCHES "(C|c?)lang") |
Are you going to merge these changes if I create a pull request or was this just a temporary patch? |
I planned to make this commit myself, but I was stuck on refactoring to add new functionality... |
Hello this is a followup to this issue. Currently with macports/GCC:
Please Note I'm reporting the issue with using GCC not Clang. The above log is just to show what compilers are installed. The following code fails when using std::size_t but compiles with std::uint64_t:
See error log below |
hi, I think please look at this restriction: https://github.com/niXman/yas/blob/master/include/yas/detail/io/json_streams.hpp#L112 so I think that is correct. |
I see, if that's the case I'm OK with that and I agree that they(size_t and uint64_t) should be different. Does that mean that yas doesn't support size_t JSON serialization? My solution currently is to simply not use size_t... |
since size_t can be 32-bit or 64-bit, support for this type was deliberately limited. |
Having this issue:
export CC=/opt/local/bin/gcc-mp-9;
export CXX=/opt/local/bin/g++-mp-9
boost is in /opt/local
I added this to CMakeKists.txt
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
include_directories("/opt/local/include")
link_directories("/opt/local/lib")
add_definitions(
-DBOOST_ERROR_CODE_HEADER_ONLY
-DBOOST_CHRONO_HEADER_ONLY
-DYAS_SERIALIZE_BOOST_TYPES
-DYAS_OBJECT_MAX_MEMBERS=50
)
The text was updated successfully, but these errors were encountered: