Cinder
Cinder copied to clipboard
Added noexcept to signals move constructors and assignment operators.
This will allow std::vector<Connection>
and std::vector<ScopedConnection>
to resize a little more efficiently. Was only waiting until our minimum compiler on MSW was v140 which is now the case.
Fixes #1681. That issue is marked for 0.9.2 milestone, although this is a pretty minor modification so it can be merged before or after that lands.
Looks good to me.
Best I can tell, you could also add noexcept
to all other constructors and assignment operators of connection and ScopedConnection while you are at it, but I'd only do that if you want to commit to keep them noexcept in the future (I think that would be a reasonable choice, but it doesn't really matter all that much).
I suppose we can, if for nothing else than congruity. There shouldn't be any exceptions in this code except with the possibility of Signal::emit()
.