by fusilli_jerry · 7y ago · 0 comments
In your example, 'a' is known at parse time to either be a type or a value even if it's a template parameter, so the statement will always parse one way or another. Of course, 'a' itself may change in type or value so the problem is still unwieldy and, probably key to your use case, requires knowledge of type information from a possibly far-off part of the translation unit.
template <typename foo> void func()
{
foo::a < foo::b , foo::c > d;
}