I'm using a custom project specific format which has the same options selected for template arguments and template parameters: "after comma" and "after closing angle bracket". In the preview window of the formatter, it shows the following:
template<typename T1, typename T2> class map
{
};
map<int, int> m;
This preview code format is exactly what I want. However I get inconsistent results in my codebase when I run the formatter. Here's an example:
std::vector < std::vector<cv::Point2i> > vertices( 1, std::vector < cv::Point2i > (0) );
for( std::vector<ObjectPoint>::const_iterator objectPointIterator = obj.m_pointList.begin( );
For some reason the first line doesn't apply the proper format and incorrectly inserts spaces between angle brackets, whereas the second line of the for loop properly spaces the template arguments.
Does anyone know how to fix this?