If you have a template in an anonymous namespace we will warn about it being unused even if it is referenced by another template, if the other template is not instantiated.
i.e compiling the following with -Wunused-template
namespace {
template <class T> void foo(T*){}
}
template <class T> void bar(T* t) {
foo(t);
}
produces
warning: unused function template 'foo' [-Wunused-template]
The only way to silence this is by using a [[maybe_unused]], which is a solution but is somewhat suboptimal.