Sublime Forum

C++ syntax highlight problem (bug?)

#1

This template function doesn’t seem to be properly highlighted. Build 3176.

template<typename T> container<bar<T>> foo(T t)
{
	return container<bar<T>> { item<bar<T>>(t) };
}

It seems to wrongly tell the last curly brace is surplus, which is not. The code compiles smoothly.

The crux seems to be linked with <bar<T>>.

To explain the code, it generates a container object list initializing with just one item, which is from a template class, with compound type <bar<T>>.

Please take a look. Thanks.

0 Likes

#2

please post this at https://github.com/sublimehq/Packages/issues, though there may already be something similar open, I’m not sure

0 Likes

#3

Thank you! Just did it.

0 Likes