Commit 9327b2a
Traits.h: Use std::is_trivially_relocatable if P1144 is available (#2216)
Summary:
Well, llvm/llvm-project#84621 isn't going anywhere in Clang, therefore #2159 will presumably never be mergeable (in the foreseeable future, anyway).
So here's an alternative approach, for your consideration: If [P1144's feature-test macro](https://open-std.org/jtc1/sc22/wg21/docs/papers/2024/p1144r10.html#wording) is set, then use `std::is_trivially_relocatable<T>` in place of `std::is_trivially_copyable<T>`.
This will produce improved codegen for e.g. `fbvector<std::vector<int>>::erase`, when compiled on a compiler supporting P1144 semantics. https://godbolt.org/z/s6sa313h3
Compare https://github.com/charles-salvia/std_error/blob/3abc272/all_in_one.hpp#L180-L196
Pull Request resolved: #2216
Reviewed By: Gownta
Differential Revision: D58147899
Pulled By: Orvid
fbshipit-source-id: 671ed21eeb6080f583e6966e776d243c99c9c17f1 parent b7d52f6 commit 9327b2a
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
622 | 622 | | |
623 | 623 | | |
624 | 624 | | |
625 | | - | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
626 | 632 | | |
627 | 633 | | |
628 | 634 | | |
| |||
0 commit comments