CPP says compile time determination and run time determination how should I understand, static and dynamic types inherited by
are easy to understand, static type compilation time is determined, and dynamic type runtime is determined.
when it comes to the explanation of unique_ptr and shared_ptr, shared_ptr passes in the custom delete calling object through the second parameter, that is, it jumps to the specified code to run at run time.
while unqiue_ptr uses the template parameter, although the type is determined at compile time, the second parameter that needs to be passed in is a calling object. Don"t you need the runtime to jump to the specified code to run? why is it said in
primer that shared_ptr is run time and unqiue is compile time?
I find it difficult for primer to go back to Chapter 16, and it doesn"t feel difficult in front of me.