Revert template disambiguator fix

This commit is contained in:
Peter Vingelmann 2016-09-15 19:33:20 +02:00
parent 03668a9b21
commit c43ddc6964

View File

@ -2871,18 +2871,6 @@ void ASBeautifier::parseCurrentLine(const string& line)
&& ASBeautifier::peekNextChar(line, i + (*newHeader).length() - 1) != '(') && ASBeautifier::peekNextChar(line, i + (*newHeader).length() - 1) != '(')
newHeader = NULL; newHeader = NULL;
// The "template" disambiguator for dependent names should not be
// recognized as an actual template header. For example:
// T::template foo<X>()
// s.template foo<X>();
// this->template foo<X>();
if (newHeader == &AS_TEMPLATE
&& (prevNonSpaceCh == ':' || prevNonSpaceCh == '.'
|| prevNonSpaceCh == '-'))
{
newHeader = NULL;
}
if (newHeader != NULL) if (newHeader != NULL)
{ {
// if we reached here, then this is a header... // if we reached here, then this is a header...