I am a C++ beginner, so sorry if the question is too basic.
I have tried to collect the string constrcturs and try all them out (to remember them).
strin
tkopec is right on why it doesn't work. To answer your second question, here's how you check the type:
template void Error_() {
TEST* MakeError = 1;
}
By calling Error_(StrA);
you will get a compile error, and your compiler will probably tell you that it happened in Error_< std::basic_string
Now, std::basic_string > is just std::string, so this really means Error_< std::string (*)(void)> (std::string (*)(void))
. The part between '<>' is repeated between '()', and that's the sype of strA. In this case, std::string (*)(void)
.