FreeBSD/contrib/gcc/cp/parser.c
/* Look for the `template' keyword, as a syntactic disambiguator.
   Return TRUE iff it is present, in which case it will be
   consumed.  */
Look for the `template' keyword, as a syntactic disambiguator.
Return TRUE iff it is present, in which case it will be
consumed.
Look for the ` template ' keyword as a syntactic disambiguator . Return TRUE iff it is present in which case it will be consumed .
static bool
cp_parser_optional_template_keyword (cp_parser *parser)
{
  if (cp_lexer_next_token_is_keyword (parser->lexer, RID_TEMPLATE))
    {
      if (!processing_template_decl)
	{
	  error ("%<template%> (as a disambiguator) is only allowed "
		 "within templates");
	  cp_lexer_purge_token (parser->lexer);
	  return false;
	}
      else
	{
	  cp_lexer_consume_token (parser->lexer);
	  return true;
	}
    }
  return false;
}
static bool cp_parser_optional_template_keyword ( cp_parser * parser ) { if ( cp_lexer_next_token_is_keyword ( parser -> lexer , RID_TEMPLATE ) ) { if ( ! processing_template_decl ) { error ( " " " " ) ; cp_lexer_purge_token ( parser -> lexer ) ; return false ; } else { cp_lexer_consume_token ( parser -> lexer ) ; return true ; } } return false ; }
Look for the `template' keyword, as a syntactic disambiguator.
Look for the ` template ' keyword as a syntactic disambiguator .
/* The `template' keyword can only be used within templates;
	 outside templates the parser can always figure out what is a
	 template and what is not.  */ /* If this part of the token stream is rescanned, the same
	     error message would be generated.  So, we purge the token
	     from the stream.  */ /* Consume the `template' keyword.  */