Possible to pass bad types to create()
Status: Alpha
Brought to you by:
madduck
Factory::create():
static inline _Type*
create(_Key const& __KEY, _Type const& __THAT)
{
_Builder* __b = _S_registry().get_builder(__KEY);
return (__b) ? __b->build(__THAT) : 0;
}
Consider what happens here:
A * a = create( "B", C );
Assuming types A --> B --> C, the above code would be
invalid but would probably compile.