https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61075

--- Comment #8 from Denes Matetelki <denes.matetelki at gmail dot com> ---
Just an observation:

The contained type also need to declare and define ctor(int).

Which can be tricky, if it is a template class and:

template <typename T>
class Custom
{
public:
  Custom(T t) : m_t(t) {}
  Custom(int i) : m_t() {}
  explicit operator int() const { return convertToInt(m_t); }

private:
  T m_t;
};

Custom<int> c; // ambigous ctor(int)

Reply via email to