I have a class that is a template, using the argument: template <class X>
Can I template this class to be of type std::pair < W, Z>? I am getting an unresolved external symbol error, and trying to track down the cause.
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.
A little example of passing a pair into a template.
would instantiate a template class taking a std::pair and holding it in a vector. Add inserts a pair made with make_pair into that vector.
Note that for older C++ compilers you need to add a space between the two right-chevrons to stop it from being seen as a right-shift operator.