title: Handling "Thrown exception type is not nothrow copy constructible" Warning
body: <p>Going back to C++ development after a 12 years hiatus. I'm using JetBrains's CLion software which is great since it provides a lot of input on possible issues on my class design. One of the warning I get in my class' constructor throw statement is: <code>Thrown exception type is not nothrow copy constructible</code>. Here is a code sample that generates this warning:</p>
  <pre><code>#include &lt;exception&gt;
  #include &lt;iostream&gt;
  
  using std::invalid_argument;
  using std::string;
  
  class MyClass {
      public:
          explicit MyClass(string value) throw (invalid_argument);
      private:
          string value;
  };
  
  MyClass::MyClass(string value) throw (invalid_argument) {
      if (value.length() == 0) {
          throw invalid_argument(&quot;YOLO!&quot;); // Warning is here.
      }
  
      this-&gt;value = value;
  } 
  </code></pre>
  <p>This piece of code compiles and I am able to unit test it. But I would like very much to get rid of this warning (in order to understand what I am doing wrong, even though it compiles).</p>