title: Can I lose "constness" in the return type of an override virtual function?
body: <p>The following code compiles and runs, and no warning is emitted by either gcc or clang:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  struct Base {
      virtual ~Base() = default;
      virtual std::string const&amp; get() = 0;
  };
  
  struct Derived: Base {
      virtual std::string&amp; get() override { return m; }
      std::string m;
  };
  
  int main()
  {
      Derived d;
      d.get() = "Hello, World";
  
      Base&amp; b = d;
      std::cout &lt;&lt; b.get() &lt;&lt; "\n";
  }
  </code></pre>
  
  <p>Is <code>std::string&amp;</code> covariant with <code>std::string const&amp;</code> then?</p>