Skip to content

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

Merged
Stephan T. Lavavej (StephanTLavavej) merged 4 commits into
microsoft:mainfrom
fsb4000:fix2558
Jun 2, 2022
Merged

<format>: add a workaround for /presetPadding#2746
Stephan T. Lavavej (StephanTLavavej) merged 4 commits into
microsoft:mainfrom
fsb4000:fix2558

Conversation

@fsb4000

Copy link
Copy Markdown
Contributor

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
Igor Zhukov (fsb4000) requested a review from a team as a code owner May 28, 2022 17:11
Comment thread stl/inc/yvals_core.h Outdated
Comment thread stl/inc/format Outdated
Comment thread tests/std/tests/GH_002558_format_presetPadding/env.lst Outdated
@CaseyCarter Casey Carter (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
Copy Markdown
Contributor

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!

Comment thread stl/inc/format Outdated
Comment thread stl/inc/format Outdated
Comment thread tests/std/tests/GH_002558_format_presetPadding/env.lst Outdated
@StephanTLavavej

Copy link
Copy Markdown
Member

Casey Carter (@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

Copy link
Copy Markdown
Member

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

@StephanTLavavej
Stephan T. Lavavej (StephanTLavavej) merged commit 7e0f223 into microsoft:main Jun 2, 2022
@StephanTLavavej

Copy link
Copy Markdown
Member

Thanks for fixing this incompatibility! πŸ”§ βš™οΈ 😸

@fsb4000
Igor Zhukov (fsb4000) deleted the fix2558 branch June 2, 2022 04:15
Igor Zhukov (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