Ok so I have code similar to the following: (cut down a bit to make it more readable)
namespace caspianprivate
{
template <typename FunctionType>
struct CScriptRegisterImpl
{
template <FunctionType* Function>
static void Register(const char* name)
{
caspian::CScriptFunctionContainer::Get()->CreateFunction<FunctionType, Function>(name);
}
};
}
namespace caspian
{
class CScriptFunctionContainer : public MapContainer_DefaultCreate<CScriptFunction>, public Singleton<CScriptFunctionContainer>
{
protected:
CScriptFunctionContainer();
};
}
in VS it compiles fine but in XCode it can't find "CScriptFunctionContainer". I can't just have one in front of the other as they have dependencies on each other.
Has anyone come across this sort of thing before? and any ideas about the solution?
EDIT:
the error I get is "'CScriptFunctionContainer' has not been declared" and it complains about the
caspian::CScriptFunctionContainer::Get()->CreateFunction<FunctionType, Function>(name);
line in the Register function.
Thanks