Skip to content

build(common): align C++ standard and spdlog include settings#48021

Draft
flcdrg wants to merge 1 commit into
microsoft:mainfrom
flcdrg:48020-fix-build-error
Draft

build(common): align C++ standard and spdlog include settings#48021
flcdrg wants to merge 1 commit into
microsoft:mainfrom
flcdrg:48020-fix-build-error

Conversation

@flcdrg
Copy link
Copy Markdown

@flcdrg flcdrg commented May 21, 2026

Summary of the Pull Request

This PR updates common project build settings to improve reliability and compatibility.

Impacted paths:

PR Checklist

N/A:

  • Localization (no end-user-facing string changes)
  • New binaries (no new binaries or test projects introduced)
  • Documentation updated (no product/docs content changes)

Detailed Description of the Pull Request / Additional comments

The change set focuses on build/toolchain configuration only:

  1. CalculatorEngineCommon now targets C++20 for Debug x64, aligning with modern language requirements in this component.
  2. UnitTests-CommonUtils now force-includes the spdlog MSVC fix header to prevent compiler/environment-specific issues during test project builds.

Risk is low and scoped to build configuration, but downstream effects may include stricter compiler behavior in Debug x64 for CalculatorEngineCommon.

Validation Steps Performed

Automated tests run:

  • None in this drafting step.

Build/test status:

  • Not executed as part of this PR-summary generation workflow.

Reason:

  • This output was generated from branch diff and status inspection only. Please replace this section with actual build/test results before opening or updating the PR.

… tests

Two independent compile failures in msbuild.binlog were caused by toolset compatibility issues introduced by newer MSVC versions.

1) CalculatorEngineCommon (Debug|x64): switch LanguageStandard from stdcpp17 to stdcpp20.
   - C++/WinRT generated headers may fall back to <experimental/coroutine> under C++17.
   - With MSVC 14.51 this path now trips STL1011/C2338 deprecation enforcement.
   - Moving to C++20 ensures standard coroutine support and avoids the deprecated fallback.

2) UnitTests-CommonUtils: force-include deps/spdlog-msvc-fix/include/spdlog-msvc-fix.h.
   - This test project consumed bundled spdlog/fmt headers but did not apply the repo's MSVC compatibility shim.
   - On MSVC 14.51+, missing stdext::checked_array_iterator causes C2653/C2061/C7568 cascades.
   - Adding ForcedIncludeFiles aligns behavior with other spdlog consumers in the repo.

No functional behavior changes are intended; this is a build/toolchain compatibility fix.
Expected result: eliminate the coroutine deprecation failure and the spdlog stdext compile cascade observed in msbuild.binlog.
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.

Build errors - experimental\coroutine(37,1): error C2338: static assertion failed, error C2653: 'stdext': is not a class,

1 participant