Sujet : Why std::vector requires noexcept move constructor?
De : news.5.maazl (at) *nospam* spamgourmet.org (Marcel Mueller)
Groupes : comp.lang.c++Date : 15. Jun 2025, 09:25:31
Autres entêtes
Organisation : MB-NET.NET for Open-News-Network e.V.
Message-ID : <102m01r$3knoc$1@gwaiyur.mb-net.net>
User-Agent : Mozilla Thunderbird
I discovered shortly that a move constructor that is not declared as noexcept is ignored by std::vector. Instead the objects are moved by the copy constructor.
Why?
The copy constructor is even more likely not declared as noexcept.
Marcel