Closed Bug 1848746 Opened 2 years ago Closed 2 years ago

Windows build failures with Visual Studio 2022 17.7: error: use of undeclared identifier 'is_function_v' & 'is_void_v'

Categories

(Firefox Build System :: General, defect)

Unspecified
Windows
defect

Tracking

(firefox118 fixed)

RESOLVED FIXED
118 Branch
Tracking Status
firefox118 --- fixed

People

(Reporter: RyanVM, Assigned: glandium)

Details

Attachments

(1 file)

I installed the 17.7 update of Visual Studio 2022 and am now hitting build failures:

In file included from C:/Users/Ryan/repos/mozilla/gfx/angle/checkout/src/gpu_info_util/SystemInfo.cpp:9:
In file included from C:/Users/Ryan/repos/mozilla/gfx/angle/checkout/src\gpu_info_util/SystemInfo.h:13:
In file included from C:/PROGRA~1/MICROS~2/2022/COMMUN~1/VC/Tools/MSVC/1437~1.328/include\optional:17:
In file included from C:/PROGRA~1/MICROS~2/2022/COMMUN~1/VC/Tools/MSVC/1437~1.328/include\exception:12:
In file included from C:/Users/Ryan/repos/mozilla/objdir-clang/dist/stl_wrappers\cstdlib:59:
In file included from C:/Users/Ryan/repos/mozilla/objdir-clang/dist/include\mozilla/mozalloc.h:16:
In file included from C:/Users/Ryan/repos/mozilla/objdir-clang/dist/stl_wrappers\new:54:
C:/PROGRA~1/MICROS~2/2022/COMMUN~1/VC/Tools/MSVC/1437~1.328/include\new(96,20): error: use of undeclared identifier 'is_function_v'
    static_assert(!is_function_v<_Ty> && !is_void_v<_Ty>,
                   ^
C:/PROGRA~1/MICROS~2/2022/COMMUN~1/VC/Tools/MSVC/1437~1.328/include\new(96,43): error: use of undeclared identifier 'is_void_v'
    static_assert(!is_function_v<_Ty> && !is_void_v<_Ty>,
                                          ^

This could be argued to be a bug in MSVC: <new> is relying on <exception> to include <type_traits> instead of including it itself. This was already the case before, but what makes the difference is that now <exception> is including <cstdlib> (before <type_traits>), which it wasn't before. That include goes through our wrappers, which include <new>...

Assignee: nobody → mh+mozilla
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/b6d00af33f9f Avoid problems when <exception> is included before <new>. r=firefox-build-system-reviewers,ahochheiden
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: