What C++ standard has better of COM? : <p>I have see such answer:</p>

<blockquote>
  <p>COM is a technique of it's own. It fulfills some special needs but
  violates a lot of good engineering principles. E.g solid. The standard
  has better ways than using COM. – mkaes</p>
</blockquote>

<p>Very interesting to know what is that "better ways"?</p>

<p>We use in our project IUnknown base class, but not COM technology itself.
IUnknown allows us:</p>

<ol>
<li>have nice specified interface abstract classes;</li>
<li>use its add()/release() as basis for intrusive smart ptrs;</li>
<li>use mechanism of QueryInterface() to be more effective than dynamic_cast;</li>
</ol>

<p>Okay, exists boost::intrusive_ptr but it is not in the standard so far. And even if it was there, this will be separate class to solve task of intrusive smart ptr.  Assuming it is there, yes I could do something as</p>

<pre><code>interface ITable : intrusive_ptr {}
interface IField : intrusive_ptr {}
</code></pre>

<p>But what about QueryInterface() mechanism?</p>

<p>P.S. This question is NOT about COM at all.</p>
