I’m created an hpp file and I need to forward declare classes as I cannot assume they are included at the time.
I have a typedef’d class, and I want to do a find in files to find the line where this is typedef’d so I can get the original class or struct name.
How can I do this? I want to search for:
typedef “AnythingInBetween” name
Try the following.
This will work for cases where it’s a typedef to a single name which matches ‘thename’ and everything occurs on a single line. This isn’t fully respective of the C++ grammar for typedefs (a regex simply can’t be) but will catch the 90% case