Skip to content

Commit

Permalink
Globally suppress C5278 (#5163)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
CaseyCarter authored Dec 5, 2024
1 parent b932cf8 commit 89ca073
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion stl/inc/yvals_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -810,14 +810,15 @@
// warning C5220: a non-static data member with a volatile qualified type no longer implies that compiler generated
// copy/move constructors and copy/move assignment operators are not trivial (/Wall)
// warning C5246: 'member': the initialization of a subobject should be wrapped in braces (/Wall)
// warning C5278: adding a specialization for 'type trait' has undefined behavior
// warning C6294: Ill-defined for-loop: initial condition does not satisfy test. Loop body not executed

#ifndef _STL_DISABLED_WARNINGS
// clang-format off
#define _STL_DISABLED_WARNINGS \
4180 4324 4412 4455 4494 4514 4574 4582 4583 4587 \
4588 4619 4623 4625 4626 4643 4648 4702 4793 4820 \
4868 4988 5026 5027 5045 5220 5246 6294 \
4868 4988 5026 5027 5045 5220 5246 5278 6294 \
_STL_DISABLED_WARNING_C4577 \
_STL_DISABLED_WARNING_C4984 \
_STL_DISABLED_WARNING_C5053 \
Expand Down

0 comments on commit 89ca073

Please sign in to comment.