Class with multiple return types?
<p>I'm making a game gui api. It will work with both Allegro and SDL. I use polymorphism for input and bitmap drawing. The issue comes with these 3 types: Bitmap, Font, and Color. SDL and Allegro are different on these. The problem is I cannot really use polymorphism here due to different return types. I wouldn't feel right to have a void* as the return type. What could I do instead so that the user could just do:</p>

<pre><code>AGBitmap bmp = AGBitmap("someimage.png");
graphics-&gt;draw(bmp);
</code></pre>

<p>Right now my AGBitmap works with only Allegro and has an overloaded = operator and manages its memory so the user does not have to.</p>

<p>What could I do?</p>

<p>Thanks</p>
