[UCRT] No __declspec(spectre(nomitigation)) for GCC/Clang

This commit is contained in:
Timo Kreuzer 2024-10-14 00:08:12 +03:00
parent 97e20ef342
commit 47e3f49e52

View file

@ -576,7 +576,10 @@ public:
// Instead of using an lfence mitigation, we can fill the table to a power of two,
// then bitwise-and all values used to index into the array.
__declspec(spectre(nomitigation)) T const& operator[](size_t const index) const
#if defined(_MSC_VER) && !defined(__clang__)
__declspec(spectre(nomitigation))
#endif
T const& operator[](size_t const index) const
{
return m_array[index & mask];
}