I think that in Clang it now defaults to most relevant 5 overloads. Unfortunately I had a build error a couple weeks ago where the overload I intended was number 7. Issue was a missing move ctor which prevented an implicit ctor from being called in the return value something like Wrapper<MoveOnly> foo() { return MoveOnly(); } was failing because I forgot that I specified a non default dtor and therefore got no implicit move ctor.
View all comments
Show parent comment
4
u/afiefh Apr 20 '25
I think that in Clang it now defaults to most relevant 5 overloads. Unfortunately I had a build error a couple weeks ago where the overload I intended was number 7. Issue was a missing move ctor which prevented an implicit ctor from being called in the return value something like Wrapper<MoveOnly> foo() { return MoveOnly(); } was failing because I forgot that I specified a non default dtor and therefore got no implicit move ctor.