This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
This implements std::launder, using Jakub's new __builtin_launder. In order to allow our headers to be used with Clang (which doesn't implement all our new built-ins yet) I've added a couple of checks using Clang's __has_builtin. My initial version of std::launder used static_assert(!is_funcion_v<_Tp> && !is_void_v<_Tp>) which required including <type_traits>, and that uses the new built-in __has_unique_object_representations, so I guarded that too. In the end I decided not to include <type_traits> in <new> and dealt with the function and void cases using deleted overloads of std::launder instead. * doc/xml/manual/status_cxx2017.xml: Update status. * doc/html/*: Regenerate. * include/std/type_traits (has_unique_object_representations): Guard with __has_builtin check. * libsupc++/new (launder): Define for C++17. * testsuite/18_support/launder/1.cc: New test. * testsuite/18_support/launder/requirements.cc: New test. * testsuite/18_support/launder/requirements_neg.cc: New test. Tested powerpc64le-linux, committed to trunk.
Attachment:
patch.txt
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |