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

Adapt MSVC C++ mode handling to VS15.5 #3061

Merged
merged 1 commit into from Dec 16, 2017
Merged

Adapt MSVC C++ mode handling to VS15.5 #3061

merged 1 commit into from Dec 16, 2017

Conversation

hkaiser
Copy link
Member

@hkaiser hkaiser commented Dec 8, 2017

No description provided.

@@ -116,6 +112,9 @@ macro(hpx_detect_cpp_dialect)
hpx_info("C++ mode assumed: C++11")
endif()

hpx_add_config_cond_define(_HAS_AUTO_PTR_ETC 1)
hpx_add_config_cond_define(_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this go in the HPX_WITH_CXX17 only?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we can do that.

@@ -89,24 +89,20 @@ macro(hpx_detect_cpp_dialect)

# enable enforcing a particular C++ mode
if(HPX_WITH_CXX17)
set(CXX_FLAG -std:c++latest)
hpx_add_config_cond_define(_HAS_AUTO_PTR_ETC 1)
set(CXX_FLAG -std:c++17)
hpx_info("C++ mode enforced: C++17")
elseif(HPX_WITH_CXX1Z)
set(CXX_FLAG -std:c++latest)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C++1z essentially is C++17, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, not quite - doesn't really change anything, however.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my point is, when the next version of MSVC is released, -std:c++latest might refer to C++2a, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who knows.

hpx_info("C++ mode enforced: C++17")
hpx_add_config_cond_define(_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS)
elseif(HPX_WITH_CXX1Z)
set(CXX_FLAG -std:c++latest)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am still unhappy with this. Isn't C++17 the latest and not C++1z?

Copy link
Member

@sithhell sithhell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now.

@hkaiser hkaiser merged commit a7717bf into master Dec 16, 2017
@hkaiser hkaiser deleted the VS2017_15_5 branch December 16, 2017 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants