<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/118727>118727</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Suppress new MSVC warning C5278 "adding a specialization for 'type trait' has undefined behavior"
</td>
</tr>
<tr>
<th>Labels</th>
<td>
libc++,
platform:windows
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
CaseyCarter
</td>
</tr>
</table>
<pre>
MSVC is adding a new warning that will be emitted for program-defined partial and explicit specializations of the Standard Library type traits defined in [[type.traits]](https://eel.is/c++draft/type.traits) per [[meta.rqmts]/4](https://eel.is/c++draft/meta.rqmts#4). MSVC implements many of the type traits directly in the compiler, so the manifestation of the undefined behavior is generally that we ignore these specializations. We're hoping the warning will reduce confusion for users who don't know these specializations are forbidden, and emitting a warning seems less hostile than just silently ignoring the specializations.
It's extremely likely that a future release of MSVC with this warning will diagnose specializations in libc++ if the warning isn't suppressed with `#pragma warning(disable : 5278)`. I'm not certain how much you folks support MSVC, but we thought you'd like a heads up.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUlM9uo0gQxp-mfSkFQWECPnBIHFkaafcUaffc0AXUpOlmu5p4vE-_amxnJqNcVrJk2UX9-X5fUVqER0fUqupZVS87vcbJh_aohS5HHSKFXefNpf3z9a8jsIA2ht0IGhyd4ayDS7_ipCOc2VroCGjmGMnA4AMswY9Bzw-GBnZkYNEhsragnQH6sVjuOYIs1LO2_K-O7J2AHyBOBK9RO6ODgT-4CzpcIF4Wghg0R4F7QXawDf6cgtk1qKqX9MFminERVT4pPCk8EdmMReGpV_is8NkEPUSFp18z8QALhVvJmaLOwj_ztSKe9v-n6i_JWO4VHjK4IpwXSzO5KDBrd7mL_aSNA_XRXpK4FOv9vLCloPAI4re_Zu14IIkbsXuN1d2pdDTpd_YhGTaSo6CtvdxcIuDR-UApReh3-Bn8TQrrQDD55Wotfdi8ORzIrH0ayg2rpO7J51UoCJwnD8Y7hXWEN-fPX7cAHSgldWwMuSRq24a0NdfNurcTolnAkghMXiLbNLN28H2VCMKW3AYpqblP-rsalT-p_OlbVFgL0I8YaCZ7ActvdAeiYVjjGggCWdJCiebm1JnjBHFi-azfsB6d_0IWO7Dc3dYAePiEjuWKRdZlCSRC5lpfPeYKyyXocf4QrrAxLLqzBKp8ggrrRuFBPeYZfFNYz-B8hJ5C1Oxg8meY136Ci19h8PZNth4-xE1Fwtutm-1x8us4xfSgwtpsEEDDRNoIrEu2M21pDuVB76gt6rIsH4umyXdTW5qyKnSV581QF9WhaepDdSjzphweh65E3HGLOe4LzKu8wP0-z3RdNIe8aJqqqPOq2at9TrNmm1n7Pmc-jDsWWaktiqbGemd1R1a2C4T4k6FCVHhUiIvVcfBhVuXTmZ3xZ0mh6mUX2lTwoVtHUfvcskT52SJytNS-3oBv9-rq682SYwILCvHjpH12dFvsZNrHq6mwhknLFy-aQtytwbafb8PIcVq7rPezwlOa6_b1sAT_nfp0JjYO6XzcULy3-F8AAAD__33U5Cw">