The problem is that class A depends on class B and vice versa. The compiler will complain abount an unknown type. The usual solution is to forward-declare the classes. But how to declare template classes?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I took me a while to find a solution so I thought i could make somebody else’s life easier by posting a “template” here.
Furthermore you are able to change the optional parameter in the template declaration.