Problem using nested std::pairs

Started by
11 comments, last by taz0010 13 years, 6 months ago
Quote:You have to tell the function what classes are involved. Iter2D in the function definition is just a placeholder for whatever class / struct you want to be used with said function.

Didn't work. The first and second parameters are template types so the compiler is already able to resolve the correct instantiation automatically.

I'll try putting the code in a blank project and see if I can isolate the problem. I'm either missing something really obvious or there's an obscure limitation regarding templates that I'm not aware of.
Advertisement
Since you're already using boost, why not replace the pair<,bool> with boost::optional?
Solved it. Turns out the error was in the getDiagonalAndConvexity function, which utilised an early return statement which I had forgotten to update when I started using nested pairs. My fault for this taking so long- I never posted that part of the code for you guys to review.

This topic is closed to new replies.

Advertisement