c++ - If there are virtual methods, is vtable is going to be created? -


if create simple class :

class {   public :     virtual void foo()     {     } }; 

(no virtual destructor) compiler going create vtable? or modern compilers smart enough recognize case (which might bad copy , paste) , not add virtual table such classes?

the v-table implementation detail. compilers use v-tables virtual functions create 1 class. don't, won't.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -