Here,
each specialization of the
task
class template has the function
next_time
as a friend;
because
process
does not have explicit
template-arguments,
each specialization of the
task
class template has an appropriately typed function
process
as a friend, and this friend is not a function template specialization;
because the friend
preempt
has an explicit
template-argument
T,
each specialization of the
task
class template has the appropriate specialization of the function
template
preempt
as a friend;
and each specialization of the
task
class template has all specializations of the function template
func
as friends
. Similarly,
each specialization of the
task
class template has the class template specialization
task<int>
as a friend, and has all specializations of the class template
frd
as friends
.