Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy Markdown
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"])

myenv.Append(CPPDEFINES=["ASIO_HAS_STD_INVOKE_RESULT"])

conf.Finish()

# C11 memset_s - a secure memset
Expand Down