Skip to content

Commit 8005ad6

Browse files
fix: workaround should be active on older Windows SDKs and only when building the std module
To ensure its active under older Windows SDKs, we make sure it runs when `_STATIC_INLINE_UCRT_FUNCTIONS` is not defined. To ensure it's present only when building the `std` module, we check for `_BUILD_STD_MODULE`. Co-authored-by: S. B. Tam <[email protected]>
1 parent e2050b9 commit 8005ad6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stl/inc/ctime

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ _EXPORT_STD using _CSTD timespec;
3333
// When set to `1`, several UCRT functions are declared as `static inline` (for historical compatibility),
3434
// preventing them from being naively exported through modules.
3535
// In that case, we use templates to shadow their name, allowing us forcibly to export them.
36-
#if defined(_STATIC_INLINE_UCRT_FUNCTIONS) && _STATIC_INLINE_UCRT_FUNCTIONS == 1
36+
#if defined(_BUILD_STD_MODULE) && (!defined(_STATIC_INLINE_UCRT_FUNCTIONS) || _STATIC_INLINE_UCRT_FUNCTIONS == 1)
3737
_STL_DISABLE_DEPRECATED_WARNING
3838

3939
_EXPORT_STD template <int = 0>

0 commit comments

Comments
 (0)