https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90102
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2019-04-16 Ever confirmed|0 |1 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- It's definitely a library bug. The problem is shown by the diagnostic messages. A DEBUG::debug vector can be constructed from a NORMAL::vector, because it has an extra constructor. Your conversion operator allows your type to convert to either DEBUG::vector or NORMAL::vector. Both of those types can convert to DEBUG::vector, so there are two equally good conversion sequences, which is ambiguous.