Your class has a conversion constructor that converts an object of type Type to an object of type Value
Value( Type type, void* data = nullptr ) {
//construct type from data.
assert( false );
}
So then you write
std::cout << getType( 2 ) << "\n";
operator << is not overloaded for type Type. So the compiler tries to convert implicitly the operand of the operator to type that can be used with the operator. And it finds such conversion because you have the conversion constructor.
You should declare the constructor as
explicit Value( Type type, void* data = nullptr );