Migrate some pull requests from OS (#20181)

Some work was required to ensure conhost builds.

---------

Co-authored-by: Dragos Sambotin <dragoss@microsoft.com>
Co-authored-by: Daniel Paoliello (HE HIM) <danpao@microsoft.com>
This commit is contained in:
Dustin L. Howett
2026-05-04 19:34:13 -05:00
committed by GitHub
parent b753e3dee3
commit dbc5177f7f
4 changed files with 23 additions and 1 deletions

View File

@@ -241,6 +241,7 @@ consoletaeftemplates
consoleuwp
CONSOLEWINDOWOWNER
consrv
consteval
constexprable
contentfiles
conterm

View File

@@ -84,8 +84,18 @@
// {fmt}, a C++20-compatible formatting library
#pragma warning(push)
#pragma warning(disable: 4702) // unreachable code
// Workaround: clang-cl advertises consteval support but fmt's use of it in
// color.h triggers "call to consteval function is not a constant expression".
// Hide __cpp_lib_is_constant_evaluated so fmt falls back to the non-consteval path.
#ifdef __clang__
#pragma push_macro("__cpp_lib_is_constant_evaluated")
#undef __cpp_lib_is_constant_evaluated
#endif
#include <fmt/compile.h>
#include <fmt/xchar.h>
#ifdef __clang__
#pragma pop_macro("__cpp_lib_is_constant_evaluated")
#endif
#pragma warning(pop)
#define USE_INTERVAL_TREE_NAMESPACE

View File

@@ -35,7 +35,8 @@ USE_NATIVE_EH = 1
USE_STD_CPP20 = 1
MSC_WARNING_LEVEL = /W4 /WX
USER_C_FLAGS = $(USER_C_FLAGS) /Zc:preprocessor /fp:contract /utf-8
USER_C_FLAGS = $(USER_C_FLAGS) /fp:contract /utf-8
ZC_PREPROCESSOR = 1
# -------------------------------------
# Common Console Includes and Libraries

View File

@@ -46,8 +46,18 @@
// {fmt}, a C++20-compatible formatting library
#pragma warning(push)
#pragma warning(disable : 4702) // unreachable code
// Workaround: clang-cl advertises consteval support but fmt's use of it in
// color.h triggers "call to consteval function is not a constant expression".
// Hide __cpp_lib_is_constant_evaluated so fmt falls back to the non-consteval path.
#ifdef __clang__
#pragma push_macro("__cpp_lib_is_constant_evaluated")
#undef __cpp_lib_is_constant_evaluated
#endif
#include <fmt/compile.h>
#include <fmt/xchar.h>
#ifdef __clang__
#pragma pop_macro("__cpp_lib_is_constant_evaluated")
#endif
#pragma warning(pop)
#include <til.h>