问题
And before you downvote, yes I could have read the whole book from Stroustrup where it's maybe written somewhere in a side not. But maybe someone else asked themselves the same question and found a good answer. At least to me it seems like this would be handy to have.
I read something that it might be confusing for the compiler to write
template <class T>
void calculator<std::complex<T>>::myMin();
but maybe just give it a hint like so? To make it clear that it is a partial specialization.
template < , class T>
void calculator<std::complex<T>>::myMin();
来源:https://stackoverflow.com/questions/40652694/why-does-the-c-standard-not-allow-function-template-partial-specialization