fix for MSVC2019 going bonkers about the various struct active
#64
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix for MSVC2019 going bonkers about the various
struct active
in the tests mixing them up in monolithic builds:by placing each within its own namespace do we prevent this confusion.
(NOT CHECKED ASSUMPTION: probably due to the MSVC2019 compiler being configured to compile at link time in my projects, but that's just a hunch. Fact is the
/RTC1
debug mode checks built in by the compiler fire up in multiple places about corruption "around the variable m" which is astruct active
instance in several tests. Having those structs in a namespace and then using the test-specific namespace in that test resolves this compiler issue.)Postscript:
Included this patch with the other pull reqs FYI; this one is rather niche as it only becomes an issue when you merge all those test programs together into a single one and compile it into a single binary (hence "monolithic build").
Reject & close if you don't like it, no sweat.
(cherrypicked off https://github.com/GerHobbelt/clipp master branch; original commit tested with latest MSVC2019)