Skip to content

Commit 89ca073

Browse files
authored
Globally suppress C5278 (#5163)
This is a new warning MSVC is adding to steer users away from attempting to specialize the type traits as forbidden by N4993 [meta.rqmts]/4. Since MSVC implements many of the type traits in the compiler, such specializations are generally ignored to the confusion of users who trigger the UB. This is a mirror of the STL portion of MSVC-PR-596210.
1 parent b932cf8 commit 89ca073

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

stl/inc/yvals_core.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,14 +810,15 @@
810810
// warning C5220: a non-static data member with a volatile qualified type no longer implies that compiler generated
811811
// copy/move constructors and copy/move assignment operators are not trivial (/Wall)
812812
// warning C5246: 'member': the initialization of a subobject should be wrapped in braces (/Wall)
813+
// warning C5278: adding a specialization for 'type trait' has undefined behavior
813814
// warning C6294: Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed
814815

815816
#ifndef _STL_DISABLED_WARNINGS
816817
// clang-format off
817818
#define _STL_DISABLED_WARNINGS \
818819
4180 4324 4412 4455 4494 4514 4574 4582 4583 4587 \
819820
4588 4619 4623 4625 4626 4643 4648 4702 4793 4820 \
820-
4868 4988 5026 5027 5045 5220 5246 6294 \
821+
4868 4988 5026 5027 5045 5220 5246 5278 6294 \
821822
_STL_DISABLED_WARNING_C4577 \
822823
_STL_DISABLED_WARNING_C4984 \
823824
_STL_DISABLED_WARNING_C5053 \

0 commit comments

Comments
 (0)