title: Is it possible to deprecate implicit conversion while allowing explicit conversion?
body: <p>Suppose I have a simple <code>Duration</code> class:</p>
  <pre><code>class Duration
  {
      int seconds;
  public:
      Duration(int t_seconds) : seconds(t_seconds) { }
  };
  
  int main()
  {
      Duration t(30);
      t = 60;
  }
  </code></pre>
  <p>And I decide that I don't like being able to implicitly convert from <code>int</code> to <code>Duration</code>. I can make the constructor <code>explicit</code>:</p>
  <pre><code>class Duration
  {
      int seconds;
  public:
      explicit Duration(int t_seconds) : seconds(t_seconds) { }
  };
  
  int main()
  {
      Duration t(30); // This is fine, conversion is explicit
      t = 60; // Doesn't compile: implicit conversion no longer present for operator=
  }
  </code></pre>
  <p>But what if I don't want to immediately break all calling code that's implicitly converting to <code>Duration</code>? What I would like to have is something like:</p>
  <pre><code>class Duration
  {
      int seconds;
  public:
      [[deprecated]]
      Duration(int t_seconds) : seconds(t_seconds) { }
  
      explicit Duration(int t_seconds) : seconds(t_seconds) { }
  };
  
  int main()
  {
      Duration t(30); // Compiles, no warnings, uses explicit constructor
      t = 60; // Compiles but emits a deprecation warning because it uses implicit conversion
  }
  </code></pre>
  <p>This would allow existing code to compile while identifying any places that currently rely on implicit conversion, so they can either be rewritten to use explicit conversion if it's intended or rewritten to have correct behavior if not.</p>
  <p>However this is impossible because I can't overload <code>Duration::Duration(int)</code> with <code>Duration::Duration(int)</code>.</p>
  <p>Is there a way to achieve something like this effect short of &quot;Make the conversion explicit, accept that calling code won't compile until you've written the appropriate changes&quot;?</p>