virtual-functions
Calling member variable's virtual function within destructor causes seg fault
I\'m having a very odd problem that I\'m hoping someone has come across. class Letter { public: Letter() virtual ~Letter()[详细]
2023-03-25 11:07 分类:问答C++ Pointer to virtual function
If you have a struct like this one struct A { void func(); }; and a reference like this one A& a; you can 开发者_如何学Cget a pointer to its func method like this:[详细]
2023-03-22 00:47 分类:问答Boost python wrapping a virtual method
I\'m using boost python to create a binding to a c++ library. A number of classes in this library have virtual methods which accept iterator/const_iterator types as arguments. I don\'t particularly wa[详细]
2023-03-20 06:28 分类:问答pure virtual declarations in subclasses
i have a a couple c++ interfaces like this: struct IThese { virtual void doThesethings() = 0; } struct IThose : public IThese {[详细]
2023-03-20 00:09 分类:问答does it makes sense a virtual template method?
Suppose a construct like this: class Interface { public: template <typename T> virtual void reportOperationError(T code , std::string message) = 0;[详细]
2023-03-19 09:10 分类:问答what is the advantage of a c++ class having static methods with exact same signature as the interface methods
What is the advantage of defining static methods with exact same signature as the in开发者_开发百科terface method in the class which implements it .[详细]
2023-03-19 08:03 分类:问答Can CRTP completely replace virtual functionality for smaller designs?
Is CRTP capable enough to outsmart virtual functionality completely ? Th开发者_如何学编程e only disadvantage I see with CRTP is notable amount of code generated for every recurring pattern. For small[详细]
2023-03-18 21:30 分类:问答When does the vptr (pointing to vtable) get initialized for a polymorphic class?
This is not about \"When VTABLE is created?\". Rather, when the VPTR should be initialized? Is it at the beginning/end of the constructor or before/after the constructor?[详细]
2023-03-18 19:10 分类:问答Virtual table/dispatch table
From what I know of CPP, each class has its own vtable. However this wikipedia link mentions: An object\'s dispatch table will[详细]
2023-03-18 02:22 分类:问答Cost of a virtual function in a tight loop
I am in a situation where I have game objects that have a virtual function Update(). There are a lot of game objects (currently a little over 7000) and the loop calls update for all of them (amongst o[详细]
2023-03-17 23:16 分类:问答