<p>We often hear/read that one should avoid dynamic casting. I was wondering what would be 'good use' examples of it, according to you?</p>

<p>Edit:</p>

<p>Yes, I'm aware of <a href="https://stackoverflow.com/questions/28002/regular-cast-vs-staticcast-vs-dynamiccast">that other thread</a>: it is indeed when reading one of the first answers there that I asked my question!</p>

My current toy project uses dynamic_cast twice; once to work around the lack of multiple dispatch in C++ (it's a visitor-style system that could use multiple dispatch instead of the dynamic_casts), and once to special-case a specific subtype.
Both of these are acceptable, in my view, though the former at least stems from a language deficit.  I think this may be a common situation, in fact; most dynamic_casts (and a great many "design patterns" in general) are workarounds for specific language flaws rather than something that aim for.