https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90320
Bug ID: 90320 Summary: Explicit constructor called implicitly Product: gcc Version: 8.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mitza at ociweb dot com Target Milestone: --- May be related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87605 but this doesn't involve the ternary operator. The following example instantiates and calls M::M<M&>(M&) on GCC 8.3 and trunk (godbolt.org), clang and other compilers don't. struct M { explicit M(int); template <typename T> explicit M(T&&); M& a(); }; struct V { V(M m); }; void addV(const V&); int main() { addV(M(1).a()); }