Visual Studio VS 2017 15.8.0: Internal compiler error with NumericTraits


Just for your information: I have filed a bug report here - since itk’s NumericTraits::max() seem to cause a problem.

Best regards,


(Matt McCormick) #2

@Sophonet thank you for reporting the issue and mentioning the ticket here!

Other folks have noted internal compiler errors with the recently released VS 2017 15.8.0.

CC: @dzenanz @imikejackson


I was able to redownload 15.7.5 (What ever the last version was) and install that until the bug gets worked out in ITK or VS.

Nice to know I was not the only one having the issue.

(Andras Lasso) #4

I’ve run into this, too, and it is quite annoying, because it is a lot of work to downgrade Visual Studio. While the error will be eventually fixed in Visual Studio, it would be great if ITK code could be simplified in the meantime so that these internal compiler errors are not triggered.

(Pablo Hernandez-Cerdan) #5

From here, it seems that’s happening next week.

(Dženan Zukić) #6

This seems to be triggered by a combination of constexpr and (void) for parameters. I will give it a stab.

Search "\(\s*void\s*\)" (5654 hits in 1558 files)

(Dženan Zukić) #7

Here is a patch. I guess that change to NumericTraits is the most important, because it combines the constexpr and (void) in a single declaration.

(Dženan Zukić) #8

I merged the patch. Also, it looks like Microsoft released an update which fixes the bug, at least most instances of it.