title: MISRA C++ 2008 Rule 5-2-3 Advisory: Casts from a base class to a derived class should not be performed on polymorphic types
body: <p>In the following example:</p>
  <pre><code>class A
  {
  public:
      A();
      virtual ~A();
      int getID() const;
  
  private:
      int m_ID;
  };
  
  Class B : public A
  {
  public:
      B();
      virtual ~B();
      int getBid() const;
  
  private:
      int m_Bid;
  };
  
  bool test(const A* const p_A)
  {
      if(5U == static_cast&lt;const B* const&gt;(p_A)-&gt;getBid())
      {
           ....
      }
      else
      {
           ...
      }
  }
  </code></pre>
  <p>I have MISRA 5-2-3 reported, but i don't now how to resolve it.</p>
  <p>MISRA 5-2-3: Casts from a base class to a derived class should not be performed on polymorphic types.</p>