Dealing with Unicode and ANSI - Templates
I'm chronically experiencing a problem while trying to deal with both unicode and ansi conditionally. Code
You'll see, I deal with both the ANSI and Unicode cases exactly the same
But because the templates are a compile time deal, I have had to check for both at the same time. I am not aware of a polymorphic base type that would allow me to do this more generally, is there any standards compliant sort of thing? Is there a way to do run-time template specialization? This just seems outrageous and I can't see how to go about it correctly.
fileok = !!wfilestream;
fileok = !!filestream;
std::cout << "File not opened\n";
fok = !!std::getline(wfilestream, wline);
fok = !!std::getline(filestream, line);
... etc ...