mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 17:12:47 +08:00
[eastl] Fix error C2039 with Visual Studio 2022 (#25593)
* [eastl] Fix error C2039 with Visual Studio 2022 * x-add-version Co-authored-by: LilyWangLL <v-lilywang@microsoft.com>
This commit is contained in:
parent
88bdc6d387
commit
4b16144233
88
ports/eastl/fix-error-C2039.diff
Normal file
88
ports/eastl/fix-error-C2039.diff
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
diff --git a/include/EASTL/numeric_limits.h b/include/EASTL/numeric_limits.h
|
||||||
|
index e991e7e9..e933c845 100644
|
||||||
|
--- a/include/EASTL/numeric_limits.h
|
||||||
|
+++ b/include/EASTL/numeric_limits.h
|
||||||
|
@@ -1435,6 +1435,19 @@ namespace eastl
|
||||||
|
static value_type round_error()
|
||||||
|
{ return 0.5f; }
|
||||||
|
|
||||||
|
+ #if defined(_MSVC_STL_UPDATE) && _MSVC_STL_UPDATE >= 202206L // If using a recent version of MSVC's STL...
|
||||||
|
+ static value_type infinity()
|
||||||
|
+ { return __builtin_huge_valf(); }
|
||||||
|
+
|
||||||
|
+ static value_type quiet_NaN()
|
||||||
|
+ { return __builtin_nanf("0"); }
|
||||||
|
+
|
||||||
|
+ static value_type signaling_NaN()
|
||||||
|
+ { return __builtin_nansf("1"); }
|
||||||
|
+
|
||||||
|
+ static value_type denorm_min()
|
||||||
|
+ { return FLT_TRUE_MIN; }
|
||||||
|
+ #else
|
||||||
|
static value_type infinity()
|
||||||
|
{ return _CSTD _FInf._Float; }
|
||||||
|
|
||||||
|
@@ -1446,6 +1459,7 @@ namespace eastl
|
||||||
|
|
||||||
|
static value_type denorm_min()
|
||||||
|
{ return _CSTD _FDenorm._Float; }
|
||||||
|
+ #endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
@@ -1553,6 +1567,19 @@ namespace eastl
|
||||||
|
static value_type round_error()
|
||||||
|
{ return 0.5f; }
|
||||||
|
|
||||||
|
+ #if defined(_MSVC_STL_UPDATE) && _MSVC_STL_UPDATE >= 202206L // If using a recent version of MSVC's STL...
|
||||||
|
+ static value_type infinity()
|
||||||
|
+ { return __builtin_huge_val(); }
|
||||||
|
+
|
||||||
|
+ static value_type quiet_NaN()
|
||||||
|
+ { return __builtin_nan("0"); }
|
||||||
|
+
|
||||||
|
+ static value_type signaling_NaN()
|
||||||
|
+ { return __builtin_nans("1"); }
|
||||||
|
+
|
||||||
|
+ static value_type denorm_min()
|
||||||
|
+ { return DBL_TRUE_MIN; }
|
||||||
|
+ #else
|
||||||
|
static value_type infinity()
|
||||||
|
{ return _CSTD _Inf._Double; }
|
||||||
|
|
||||||
|
@@ -1564,6 +1591,7 @@ namespace eastl
|
||||||
|
|
||||||
|
static value_type denorm_min()
|
||||||
|
{ return _CSTD _Denorm._Double; }
|
||||||
|
+ #endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
@@ -1671,6 +1699,19 @@ namespace eastl
|
||||||
|
static value_type round_error()
|
||||||
|
{ return 0.5f; }
|
||||||
|
|
||||||
|
+ #if defined(_MSVC_STL_UPDATE) && _MSVC_STL_UPDATE >= 202206L // If using a recent version of MSVC's STL...
|
||||||
|
+ static value_type infinity()
|
||||||
|
+ { return __builtin_huge_val(); }
|
||||||
|
+
|
||||||
|
+ static value_type quiet_NaN()
|
||||||
|
+ { return __builtin_nan("0"); }
|
||||||
|
+
|
||||||
|
+ static value_type signaling_NaN()
|
||||||
|
+ { return __builtin_nans("1"); }
|
||||||
|
+
|
||||||
|
+ static value_type denorm_min()
|
||||||
|
+ { return LDBL_TRUE_MIN; }
|
||||||
|
+ #else
|
||||||
|
static value_type infinity()
|
||||||
|
{ return _CSTD _LInf._Long_double; }
|
||||||
|
|
||||||
|
@@ -1682,6 +1723,7 @@ namespace eastl
|
||||||
|
|
||||||
|
static value_type denorm_min()
|
||||||
|
{ return _CSTD _LDenorm._Long_double; }
|
||||||
|
+ #endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
};
|
@ -8,7 +8,8 @@ vcpkg_from_github(
|
|||||||
HEAD_REF master
|
HEAD_REF master
|
||||||
PATCHES
|
PATCHES
|
||||||
fix_cmake_install.patch
|
fix_cmake_install.patch
|
||||||
Fix-error-C2338.patch
|
Fix-error-C2338.patch
|
||||||
|
fix-error-C2039.diff
|
||||||
)
|
)
|
||||||
|
|
||||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/EASTLConfig.cmake.in" DESTINATION "${SOURCE_PATH}")
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/EASTLConfig.cmake.in" DESTINATION "${SOURCE_PATH}")
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "eastl",
|
"name": "eastl",
|
||||||
"version-string": "3.18.00",
|
"version-string": "3.18.00",
|
||||||
"port-version": 2,
|
"port-version": 3,
|
||||||
"description": "Electronic Arts Standard Template Library. It is a C++ template library of containers, algorithms, and iterators useful for runtime and tool development across multiple platforms. It is a fairly extensive and robust implementation of such a library and has an emphasis on high performance above all other considerations.",
|
"description": "Electronic Arts Standard Template Library. It is a C++ template library of containers, algorithms, and iterators useful for runtime and tool development across multiple platforms. It is a fairly extensive and robust implementation of such a library and has an emphasis on high performance above all other considerations.",
|
||||||
"homepage": "https://github.com/electronicarts/EASTL",
|
"homepage": "https://github.com/electronicarts/EASTL",
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
|
@ -2022,7 +2022,7 @@
|
|||||||
},
|
},
|
||||||
"eastl": {
|
"eastl": {
|
||||||
"baseline": "3.18.00",
|
"baseline": "3.18.00",
|
||||||
"port-version": 2
|
"port-version": 3
|
||||||
},
|
},
|
||||||
"easycl": {
|
"easycl": {
|
||||||
"baseline": "0.3",
|
"baseline": "0.3",
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "1e7b533fac097c3aa75f7b46630ea62f10980f87",
|
||||||
|
"version-string": "3.18.00",
|
||||||
|
"port-version": 3
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"git-tree": "aa2de2990c3b1e6e008e1cafea8ad82c765278fb",
|
"git-tree": "aa2de2990c3b1e6e008e1cafea8ad82c765278fb",
|
||||||
"version-string": "3.18.00",
|
"version-string": "3.18.00",
|
||||||
|
Loading…
Reference in New Issue
Block a user