I have a template class called RenderShader, I also have a class called Render. I would like to have all instances of the RenderShader template class to be friends with Render. Also the user is allowed to make their own RenderShader instances so it’s not possible to list all of them in the main header file. For Example:
template<class vertdef>
class RenderShader
{
public:
.....
};
class Render
{
friend class RenderShader;
public:
....
};
The syntax “friend RenderShader” is wrong, is there a correct syntax for what I would like to do?
1 Answer