>>466
あ、そういえば、それでイイじゃん。つーか、そっちの方がいいかも。
俺が作ったのは、こんなモノ

class __object
{
 template< typename Type > struct holder
 {
  static holder* unique()
  {
   static holder obj;
   return obj;
  }
 };
public:
 template< typename InstanceType > __object( InstanceType& ) throw()
  : p_( holder<InstanceType>::unique() )
 {}
 template< typename CompareType > bool instanceof() const throw()
 { return p_ == holder<CompareType>::unique(); }
private:
 void* p_;
};

で、こう使う。
if( __object( obj ).instanceof<T>() ){ ... }