Re: Types prefixed by "class" or "struct" string??

Paul Koning <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>

> On Feb 21, 2020, at 9:48 AM, Paul Smith <[email protected]> wrote:
> 
> ...
> If I try to look up a type without the "class " prefix it works fine:
> 
> (gdb) python
>> t = gdb.lookup_type('std::__cxx11::list<Object::Pending, std::allocator<Object::Pending> >::_Node')
>> print str(t)
>> ^D
> std::__cxx11::list<Object::Pending, std::allocator<Object::Pending> >::_Node
> 
> But, if I try to look up the type including the "class " it definitely
> fails:

Well, sure.  "class" is not part of the name of the type.  

Also note that class and struct are basically synonyms, the only difference is whether the default access is private (class) or public (struct).  While by tradition "struct" is used when defining "plain old data" that is not a requirement.

	paul
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.