Skip to content

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

Closed
mkuzmik wants to merge 1 commit intomongodb:masterfrom
mkuzmik:SERVER-82285
Closed

SERVER-82285 Set ASIO_HAS_STD_INVOKE_RESULT is compiling with C++20#1576
mkuzmik wants to merge 1 commit intomongodb:masterfrom
mkuzmik:SERVER-82285

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?

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"])

@mkuzmik
Copy link
Author

mkuzmik commented Jun 26, 2025

Closing this one as it seems outdated

@mkuzmik mkuzmik closed this Jun 26, 2025
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