On Tue, Jun 20, 2023 at 6:05 AM Nikl Kelbon via Std-Proposals <std-proposals@lists.isocpp.org> wrote:I've been working on improving trivial relocation proposals and I think I've found a new tool in a language we don't use
About relocation:There are few possibilities to create move ctor:
1. trivial memcpy
2. exchange with default state3. self reference scenario4. do not have move ctor at all...and many more. :) You should read Appendix C:[...] then we can add traitis_not_self_reference<T>(traits checks if T has field or base class with non 'swap'/'default' move recursivelly)We need a solution that can reliably distinguish MSVC's std::list from libc++/libstdc++'s std::list.(The former uses the "sentinel node" technique; the latter two use the "dummy node" technique. You need to learn the difference between them.)What if we add trait is_trivially_destructible_after_move?You're describing Niall Douglas's P1029. Watch "Trivially Relocatable" (2019), particularly slide 109.–Arthur