Forward Declare a typedef

Recently I came by a problem where a forward declare was needed for an external library, but the variable type was declared as a typedef of a structure with no name.

To resolve it, I forward declared a structure name of my own choosing, and then in the cpp file made the structure inherit off the typedef.

//
struct MyForwardDeclare;
 
//
void SomeFunc();
 
//
void SomeFunc( const MyForwardDeclare & inVariable );
//
//
#include "SomeFile.h"
 
//
//
typedef struct
{
	int x;
} SomeStruct;
 
//
//
struct MyForwardDeclare : SomeStruct {};
 
//
//
void SomeFunc()
{
	MyForwardDeclare var;
	var.x = 1;
	SomeFunc( var );
}
 
//
//
void SomeFunc( const MyForwardDeclare & inVariable )
{
	printf( "%d", inVariable.x );
}

Not the best example since the code was inside a class, but thats the general idea.