Project

General

Profile

Actions

Emulator Issues #12925

closed

std::aligned_storage_t is deprecated in C++23

Added by STL_MSFT almost 2 years ago. Updated almost 2 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
Yes
Regression start:
Fixed in:
5.0-16639

Description

I work on MSVC's C++ Standard Library, where we've recently implemented a C++23 paper that affects your project. (We regularly build many open-source projects to prevent compiler/library regressions, and this also allows us to notify projects of breaking changes that will affect them.)

The C++23 paper is https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p1413r3.pdf "Deprecate std::aligned_storage and std::aligned_union". We've merged a PR (https://github.com/microsoft/STL/pull/2583 ) that makes aligned_storage, aligned_storage_t, aligned_union, and aligned_union_t emit deprecation warnings when compiled in C++23 mode (/std:c++latest). Although your project might not use /std:c++latest right now, we run such test coverage to identify issues that you might encounter in the future.

I searched and one line of affected code appears to be (there may be more):

https://github.com/dolphin-emu/dolphin/blob/62601663e578bcd0b981e134c84fbc9d37850a15/Source/Core/Common/BitUtils.h#L204

In general, the recommended replacement is to use the alignas keyword. We do provide an "escape hatch" macro to silence the deprecation warning, if necessary.

Actions #1

Updated by JosJuice almost 2 years ago

  • Relates to maintainability changed from No to Yes

Thanks for letting us know!

Actions #2

Updated by flacs almost 2 years ago

  • Status changed from New to Fix pending
Actions #3

Updated by golivax almost 2 years ago

I think this issue has already been fixed, right? (PR has been merged). Status should probably be updated

Actions #4

Updated by pokechu22 almost 2 years ago

  • Status changed from Fix pending to Fixed
  • Fixed in set to 5.0-16639

Yep, it was merged in 5.0-16639. Thanks for mentioning that!

Actions

Also available in: Atom PDF