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

SERVER-82285 Set ASIO_HAS_STD_INVOKE_RESULT is compiling with C++20 #1576

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mkuzmik
Copy link

@mkuzmik mkuzmik commented Oct 18, 2023

@kelly-cs kelly-cs self-assigned this Oct 21, 2023
@ghost
Copy link

ghost commented Mar 13, 2024

@dmoody256 could you take a look at this PR?

@@ -3868,6 +3868,9 @@ def doConfigure(myenv):
if get_option('cxx-std') == "20" and not conf.CheckCxx20():
myenv.ConfError('C++20 support is required to build MongoDB')

if get_option('cxx-std') == "20" and conf.CheckCxx20():
Copy link
Contributor

Choose a reason for hiding this comment

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

c++20 is currently the only viable option, so theres not much reason to put this define under this condition. Also this condition is isolated to exactly c++20 and so its not forward compatible. So it should just be unconditionally added after the c++20 check above.

# ASIO will use std::result_of which was removed in c++20
# force it to use the newer alternative std::invoke_result
myenv.Append(CPPDEFINES=["ASIO_HAS_STD_INVOKE_RESULT"])

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.

3 participants