Skip to content

[MrBot] Require C++17 in default build options - #471

Open
Abhinandan Sharma (abhinandan-codes) wants to merge 3 commits into
masterfrom
abhinandan/cpp17-40033102
Open

Abhinandan Sharma (abhinandan-codes) wants to merge 3 commits into
masterfrom
abhinandan/cpp17-40033102

Conversation

@abhinandan-codes

@abhinandan-codes Abhinandan Sharma (abhinandan-codes) commented Oct 20, 2026 •

Copy link
Copy Markdown

Require at least C++17 in set_default_build_options() for all C++ targets, including tests, while preserving a newer caller-selected standard.

Prerequisites that remove deprecated <cstdbool>/<cstdalign> includes from C++ code: Azure/c-pal#653, zrpc !17611682, Azure-MessagingStore !17611683, Azure-Messaging-GeoReplication !17611684.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@abhinandan-codes

Copy link
Copy Markdown
Author

/azp run Azure-C-Build-Tools-Gate

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@abhinandan-codes

Copy link
Copy Markdown
Author

/azp run Azure-C-Build-Tools-Gate

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

if (NOT DEFINED CMAKE_CXX_STANDARD OR CMAKE_CXX_STANDARD LESS 17)
set(CMAKE_CXX_STANDARD 17)
endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this change validated on all repos that it passes the gate?
Sounds like something that has chances of failing down the pipeline - in EBS/ELS.
Let's make draft PRs with this SHA just to make sure we pass gates before we push it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🕐

Comment thread build_functions/CMakeLists.txt Outdated
#use _CRT_SECURE_NO_WARNINGS by default
add_definitions(-D_CRT_SECURE_NO_WARNINGS)

# C-facing dependency headers still include <cstdbool>, which MSVC deprecates in C++17.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

cstdbool

we shouldn't include cstdbool, that's actually a fair warning. Can we clean those up? We should only include "stdbool.h" for C and nothing for c++

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@abhinandan-codes

Copy link
Copy Markdown
Author

/azp run Azure-C-Build-Tools-Gate

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@abhinandan-codes

Copy link
Copy Markdown
Author

/azp run Azure-C-Build-Tools-Gate

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@mattdurak Matt Durak (mattdurak) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

:shipit:

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