Skip to content

Conversation

@mingxwa
Copy link
Member

@mingxwa mingxwa commented Mar 4, 2025

Motivation

Static operator() is a C++23 feature that can improve code generation. Although won't help much in optimized builds, it's the recommended way to define an operator() function nowadays. Resolves #258.

Changes

  • Updated implementation of the built-in dispatch types to use static operator() if available.
  • Updated existing BVT to build proxy in C++23 mode with the latest compilers.
  • Added bvt-compatibility.yml to build proxy in C++20 mode. -Wno-c++2b-extensions is required for Clang in C++20 mode to avoid warnings when building tests.
  • Added a unit test case for multidimensional subscript (requires C++23).

@mingxwa mingxwa requested review from Copilot, guominrui and tian-lt March 4, 2025 12:03
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

PR Overview

This PR updates the CI workflows to support building and testing the "proxy" component in C++23 mode, aligning with the new static operator() convention. Key changes include:

  • Updating various workflow files to use C++23 by setting the CMAKE_CXX_STANDARD flag.
  • Consolidating build directories for several CI jobs.
  • Adding a new compatibility test workflow for C++20 mode with Clang.

Reviewed Changes

File Description
.github/workflows/bvt-compatibility.yml New workflow file for C++20 compatibility builds.
.github/workflows/bvt-appleclang.yml Updated build command to enforce C++23.
.github/workflows/bvt-msvc.yml Updated build command and runner version.
.github/workflows/bvt-clang.yml Streamlined to use clang-19 with C++23.
.github/workflows/bvt-gcc.yml Consolidated build directory and enforced C++23.
.github/workflows/bvt-nvhpc.yml Consolidated build directory and enforced C++23.
.github/workflows/pipeline-ci.yml Added a step to run the new compatibility workflow.

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

@mingxwa mingxwa merged commit fc7e1e4 into microsoft:main Mar 5, 2025
8 checks passed
@mingxwa mingxwa deleted the user/mingxwa/ftm branch March 5, 2025 08:18
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.

The implementation of dispatch types can be static after C++23

2 participants