Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Fix error during compilation with /permissive-#18272

Merged
jkotas merged 1 commit into
dotnet:masterfrom
kant2002:permissive-compilation
Jun 4, 2018
Merged

Fix error during compilation with /permissive-#18272
jkotas merged 1 commit into
dotnet:masterfrom
kant2002:permissive-compilation

Conversation

@kant2002
Copy link
Copy Markdown

@kant2002 kant2002 commented Jun 4, 2018

Closes #17944

size_t size)
{
for (size_t i = 0; i != _size; ++i)
for (size_t i = 0; i != size; ++i)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You may want to check if this function is actually used. Since it used to compile there's a good change that it is not and it compiled only due to the way older versions of VC++ handle templates.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@mikedn indeed it is not used, at least after removing it code still compiling. Is it safe to be removed? In the docs seems that code is compiled using VS 2015 too, but I only check using VS 2017 toolchain.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it is ok to keep it for symmetry, even though it is unused right now.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Right, it's not 100% unused as it may seem. This is template code so it's possible, at least in theory, that at some point someone will attempt to instantiate with a type parameter different from char/wchar_t

@jkotas jkotas merged commit da0a054 into dotnet:master Jun 4, 2018
@jkotas
Copy link
Copy Markdown
Member

jkotas commented Jun 4, 2018

Thanks!

@kant2002 kant2002 deleted the permissive-compilation branch June 4, 2018 17:10
@karelz karelz added Hackathon Issues picked for Hackathon area-Build labels Jun 4, 2018
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-Infrastructure-coreclr Hackathon Issues picked for Hackathon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CoreCLR failures when build permissive- + msvc on windows

5 participants