Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: goo-engine-main
Choose a base branch
from

Conversation

illusion0001
Copy link
Contributor

@illusion0001 illusion0001 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
@illusion0001 illusion0001 changed the title Upstream Pick: Fix build new MSVC version Upstream: Build: Ambiguous call to isfinite for MSVC 17.11 Oct 1, 2024
@illusion0001 illusion0001 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