void Expression::set( const variant& v ) { if(v.type() == m_pValueType->removeReference()) { store(v.buffer()); } else { variant casted = v.as(m_pValueType->removeReference()); if(casted.isNull()) { o_exception(exception::reflection_runtime_exception, "Cannot convert variant to expression value type"); } store(casted.buffer()); } }