
13 Nov
2004
13 Nov
'04
2:16 a.m.
Beman Dawes wrote:
It might be messy to make the single path class approach work if Windows is viewed as a dual rather than wide O/S.
path p; p /= "foo"; if ( some_bool ) p /= L"kühl";
if ( exists( p ) ) ... // use wide or narrow API depending on some_bool I guess path objects could keep track of whether or not they had ever been modified by an argument other than a char string, and use the Windows wide API. Seems messy...
It's worse. Some versions of Windows (9x) are narrow-minded, but you don't know that at compile time. ;-) You pretty much have to treat Windows as a dual OS; it's impossible to choose a native character type until the program is run.