Recently, I saw a unfamiliar statement for C++ template, something like:
x3::rule<class expression> const expression("expression");
x3::rule<class term> const term("term");
x3::rule<class factor> const factor("factor");
It's an exmaple source code for Boost.Spirit.X3(https://github.com/djowel/spirit_x3/blob/master/example/x3/calc1.cpp#L41)
It seems that these lines declare expression, term, and factor variable of template class x3::rule. What's curious thing is <class expression> part for example. I've never seen such statemet ever.
When declare a variable of template class, one specify 'a type' as template argument, so I can guess 'class expression' means some type. However, expression is a name of variable and the combination of a keyword 'class', that is, 'class expression' seems awkward. Further more, the variable 'expression' is not yet declared when instantiate x3::rule. Is it something like forward declaration using variable name?
Please let me know how these declarations work and the term for such statements if any.