Skip to content

Upstream: Build: Ambiguous call to isfinite for MSVC 17.11#92

Open
illusionyy wants to merge 1 commit intodillongoostudios:goo-engine-mainfrom
illusionyy:msvc-yap
Open

Upstream: Build: Ambiguous call to isfinite for MSVC 17.11#92
illusionyy wants to merge 1 commit intodillongoostudios:goo-engine-mainfrom
illusionyy:msvc-yap

Conversation

@illusionyy
Copy link
Contributor

@illusionyy illusionyy commented Sep 20, 2024

Fixes build for new MSVC versions.

D:\a\goo-blender\goo-blender\intern\cycles\scene\image.cpp(637,14): error C2668: 'ccl::`anonymous-namespace'::isfinite': ambiguous call to overloaded function [D:\a\goo-blender\build_windows_x64_vc17_Release\intern\cycles\scene\cycles_scene.vcxproj]
    D:\a\goo-blender\goo-blender\intern\cycles\scene\image.cpp(40,6):
    could be 'bool ccl::`anonymous-namespace'::isfinite(uint16_t)'
    D:\a\goo-blender\goo-blender\intern\cycles\scene\image.cpp(36,6):
    or       'bool ccl::`anonymous-namespace'::isfinite(ccl::half)'
    D:\a\goo-blender\goo-blender\intern\cycles\scene\image.cpp(32,6):
    or       'bool ccl::`anonymous-namespace'::isfinite(ccl::uchar)'

Original commit comment:


Build: Ambiguous call to isfinite for MSVC 17.11

Overload resolution must have changed and is causing issues for one particular code path attempting to use isfinite(ccl::uchar). Compiler output attached.

It turns out that the code in question can be simplified to just remove the ambiguity because only the float codepath wants to check for finite values.


Reduced repro: https://godbolt.org/z/YWz3Yc3x8
Pull Request: https://projects.blender.org/blender/blender/pulls/125348

Overload resolution must have changed and is causing issues for one
particular code path attempting to use `isfinite(ccl::uchar)`.
Compiler output attached.

It turns out that the code in question can be simplified to just remove
the ambiguity because only the float codepath wants to check for finite
values.

----
Reduced repro: https://godbolt.org/z/YWz3Yc3x8

Pull Request: https://projects.blender.org/blender/blender/pulls/125348
@illusionyy illusionyy changed the title Upstream Pick: Fix build new MSVC version Upstream: Build: Ambiguous call to isfinite for MSVC 17.11 Oct 1, 2024
@illusionyy illusionyy changed the title Upstream: Build: Ambiguous call to isfinite for MSVC 17.11 Upstream: Build: Ambiguous call to isfinite for MSVC 17.11 Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants