Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<format>: add a workaround for /presetPadding #2746

Merged
merged 4 commits into from
Jun 2, 2022

Conversation

fsb4000
Copy link
Contributor

@fsb4000 fsb4000 commented May 28, 2022

Fixes #2558

<ntdef.h> has

#ifndef DECLSPEC_NOINITALL
#if (_MSC_VER >= 1915) && !defined(MIDL_PASS) && !defined(SORTPP_PASS) && !defined(RC_INVOKED)
#define DECLSPEC_NOINITALL __pragma(warning(push)) __pragma(warning(disable:4845)) __declspec(no_init_all) __pragma(warning(pop))
#else
#define DECLSPEC_NOINITALL
#endif
#endif

@fsb4000 fsb4000 requested a review from a team as a code owner May 28, 2022 17:11
stl/inc/yvals_core.h Outdated Show resolved Hide resolved
stl/inc/format Outdated Show resolved Hide resolved
tests/std/tests/GH_002558_format_presetPadding/env.lst Outdated Show resolved Hide resolved
@CaseyCarter CaseyCarter added bug Something isn't working format C++20/23 format labels May 28, 2022
Co-authored-by: Casey Carter <Casey@Carter.net>
Copy link
Member

@CaseyCarter CaseyCarter left a comment

Choose a reason for hiding this comment

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

Looks great - thanks again, fsb4000!

stl/inc/format Outdated Show resolved Hide resolved
stl/inc/format Outdated Show resolved Hide resolved
tests/std/tests/GH_002558_format_presetPadding/env.lst Outdated Show resolved Hide resolved
@StephanTLavavej
Copy link
Member

@CaseyCarter I pushed very small changes after you approved.

I've also recorded that we should be able to remove this workaround after the 17.3 Preview 2 toolset update.

@StephanTLavavej StephanTLavavej self-assigned this Jun 1, 2022
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit 7e0f223 into microsoft:main Jun 2, 2022
@StephanTLavavej
Copy link
Member

Thanks for fixing this incompatibility! 🔧 ⚙️ 😸

@fsb4000 fsb4000 deleted the fix2558 branch June 2, 2022 04:15
fsb4000 added a commit to fsb4000/STL that referenced this pull request Aug 13, 2022
Co-authored-by: Casey Carter <Casey@Carter.net>
Co-authored-by: Stephan T. Lavavej <stl@nuwen.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working format C++20/23 format
Projects
None yet
Development

Successfully merging this pull request may close these issues.

<format>: Bogus compiler errors with /presetPadding
3 participants