Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std::aligned_storage is deprecated in c++23 #2321

Open
christianbrugger opened this issue Oct 20, 2024 · 1 comment
Open

std::aligned_storage is deprecated in c++23 #2321

christianbrugger opened this issue Oct 20, 2024 · 1 comment

Comments

@christianbrugger
Copy link

When using folly with Clang and C++23 I get deprecation warnings when using folly::small_vector.

When I use -Werror on my code, the build fails.

/app/./folly/Traits.h:502:1: error: 'aligned_storage<4, 4>' is deprecated 
                            [-Werror,-Wdeprecated-declarations]
  502 | using aligned_storage_for_t =
      | ^
/opt/compiler-explorer/gcc-14.2.0/lib/gcc/x86_64-linux-gnu/14.2.0/../../../../
                            include/c++/14.2.0/type_traits:2182:5: note: 
                            'aligned_storage<4, 4>' has been explicitly marked deprecated here
 2182 |     _GLIBCXX23_DEPRECATED
      |     ^
/opt/compiler-explorer/gcc-14.2.0/lib/gcc/x86_64-linux-gnu/14.2.0/../../../../
                            include/c++/14.2.0/x86_64-linux-gnu/bits/c++config.h:139:34: 
                            note: expanded from macro '_GLIBCXX23_DEPRECATED'
  139 | # define _GLIBCXX23_DEPRECATED [[__deprecated__]]
      |                                  ^
1 error generated.

https://godbolt.org/z/76rcdcz63

@gedanziger
Copy link

This paper (supporting deprecation of aligned storage) actually mentioned folly: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p1413r3.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants