<atomic>: Remove _ENABLE_ATOMIC_ALIGNMENT_FIX (#723)

Fixes #717.
This commit is contained in:
Stefan Stipanovic 2020-04-22 10:42:24 +02:00 коммит произвёл GitHub
Родитель b76647085e
Коммит b1c18611b9
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 0 добавлений и 15 удалений

Просмотреть файл

@ -1529,16 +1529,6 @@ public:
return _Result;
}
#ifndef _ENABLE_ATOMIC_ALIGNMENT_FIX
static_assert(alignof(_Ty) >= sizeof(_Ty) || (sizeof(_Ty) != 2 && sizeof(_Ty) != 4 && sizeof(_Ty) != 8),
"You've instantiated std::atomic<T> with sizeof(T) equal to 2/4/8 and alignof(T) < sizeof(T). "
"Before VS 2015 Update 2, this would have misbehaved at runtime. "
"VS 2015 Update 2 was fixed to handle this correctly, "
"but the fix inherently changes layout and breaks binary compatibility. "
"Please define _ENABLE_ATOMIC_ALIGNMENT_FIX to acknowledge that you understand this, "
"and that everything you're linking has been compiled with VS 2015 Update 2 (or later).");
#endif // _ENABLE_ATOMIC_ALIGNMENT_FIX
#else // ^^^ don't break ABI / break ABI vvv
_NODISCARD bool is_lock_free() const volatile noexcept {

Просмотреть файл

@ -6,8 +6,6 @@
// Regress\intrin\atomic.cpp
//
#define _ENABLE_ATOMIC_ALIGNMENT_FIX
#include <assert.h>
#include <atomic>
#include <limits>

Просмотреть файл

@ -1,8 +1,6 @@
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#define _ENABLE_ATOMIC_ALIGNMENT_FIX
#include <algorithm>
#include <assert.h>
#include <deque>

Просмотреть файл

@ -4,7 +4,6 @@
// test <atomic> C++11 header
#define TEST_NAME "<atomic>"
#define _ENABLE_ATOMIC_ALIGNMENT_FIX
#define _SILENCE_CXX20_ATOMIC_INIT_DEPRECATION_WARNING
#include "tdefs.h"