Skip to content
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

3rdparty: remove optional submodule + misc #5045

Merged
merged 4 commits into from
Aug 31, 2018
Merged

3rdparty: remove optional submodule + misc #5045

merged 4 commits into from
Aug 31, 2018

Conversation

scribam
Copy link
Contributor

@scribam scribam commented Aug 27, 2018

With C++17, the optional submodule is not necessary anymore.

@Nekotekina
Copy link
Member

Ironically may still need it for OSX...

@scribam
Copy link
Contributor Author

scribam commented Aug 27, 2018

The optional's header from the submodule has been removed in the commit 5afd12e. Was it a mistake?
If the compiler supports C++17, it should be able to use optional (https://en.cppreference.com/w/cpp/utility/optional). Am I missing something?

@hcorion
Copy link
Member

hcorion commented Aug 28, 2018

MacOS's optional headers seem to be bugged, with XCode 9.4 they're hidden behind experimental::optional and fail with

../rpcs3/Emu/RSX/GL/GLGSRender.cpp:490:64: error: call to unavailable member function 'value': 

and in Xcode 10 Beta they've been moved out of experimental but still have the same issue.

@scribam
Copy link
Contributor Author

scribam commented Aug 28, 2018

You can replace

const GLenum index_type = std::get<0>(upload_info.index_info.value());

by

const GLenum index_type = std::get<0>(*upload_info.index_info);

It should do the trick on MacOS. Source: https://stackoverflow.com/questions/44217316/how-do-i-use-stdoptional-in-c

@hcorion
Copy link
Member

hcorion commented Aug 29, 2018

Ok, so do you want to add that to the PR @scribam or just keep the optional submodule and only enable it for MacOS? I'm fine with changing the minimum XCode version to 10.

@hcorion hcorion mentioned this pull request Aug 29, 2018
@kd-11
Copy link
Contributor

kd-11 commented Aug 29, 2018

Update this when things build smoothly on mac. I don't think anyone cares about what version of XCode is required at this time, as long as it builds and runs. CI builds are not yet available. I'll let @hcorion review this as he has access to a mac.

@scribam
Copy link
Contributor Author

scribam commented Aug 30, 2018

@hcorion Compilation fixes for optional added in this PR

@kd-11 I don't think it will happen soon except if Travis updates their osx image.
The issue related to optional is not the only one, I found at least an other issue (I added #5055 in my test build), see below:

../rpcs3/Emu/RSX/GL/GLVertexBuffers.cpp:190:16: error: call to unavailable function 'visit': introduced in macOS 10.14
        auto result = std::visit(draw_command_visitor(*m_index_ring_buffer, m_vertex_layout), get_draw_command(rsx::method_registers));

@scribam scribam changed the title 3rdparty: remove optional submodule 3rdparty: remove optional submodule + misc Aug 31, 2018
@Nekotekina Nekotekina merged commit bf89b70 into RPCS3:master Aug 31, 2018
@scribam scribam deleted the optional-removal branch August 31, 2018 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants