typeinfo
Getting type names at compile time in C++ [duplicate]
This question already has answers here: Can I obtain C++ type names in a constexpr way? (3 answers) Closed 1 year ago.[详细]
2023-04-06 00:47 分类:问答Will equal type_info addresses mean equal types?
I\'m micro-optimizing code for identifying object types. I assume I can use the following for checking whether two objects instantiated in the same module have identical types:[详细]
2023-03-27 15:28 分类:问答What's the lifetime of the object returned by typeid operator?
If I call typeid and retrieve the address of returned type_info: const type_info* info = &( typeid( Something ) );[详细]
2023-03-27 02:15 分类:问答Can type_info pointers be used to distingush types in C++?
I have a set of polymorphic C++ classes and they are all instantiated by the same module (Windows DLL). Now having two pointers to such classes and having called typeid:[详细]
2023-03-27 01:52 分类:问答C++ virtual functions.Problem with vtable [duplicate]
This question already has answers here: Closed 11 years ago. Possible Duplicate: GCC C++ Linker errors: Undefined reference to 'vtable for XXX', Undefined reference to 'ClassName::[详细]
2023-03-15 22:09 分类:问答how to create a container that takes one object of each kind?
I tried to create a container for posible metadata that can be attached to my objects. I can guarantee that there will be at most one object af each kind attached to my class but there is no limit for[详细]
2023-03-14 10:17 分类:问答typeinfo cause a segmentation fault
I hava asegmentation fault. debug with gdb, the first开发者_JAVA百科 frame in the stack is in the typeinfo for MyClass()[详细]
2023-02-18 04:38 分类:问答Why is std::type_info noncopyable? Am I allowed to store it somewhere?
The std::type_info class is non-copyable. This makes it hard to store 开发者_开发问答it in an object for later use. What should I do?There is a much better solution in C++11. A new copyable wrapper ca[详细]
2023-02-17 10:38 分类:问答Storing Datatype Information
Let\'s say I have a few variables of different types. int MyInteger; double MyDouble; char MyChar; Pointers to these variables are stored in a single array of void pointers.[详细]
2023-02-09 00:59 分类:问答C++ : Mixing : boost::any + typeid + pointer : clone 'generic' value if it is a pointer
Here is what I would like to do: From a boost::any I would like to know it is a pointer type. If it is a pointer, I have开发者_如何学运维 to clone it[详细]
2023-01-29 12:20 分类:问答