Jean-Marc Lasgouttes wrote: > Angus> and therein lies the crux of the problem. Of course it is > Angus> possible to do this, but does it make any sense to do so? Only > Angus> code within a USE_WINDOWS_PACKAGING define would call > Angus> get_folder_path and the int that is passed to the function has > Angus> meaning only under Windows. Why make the function available to > Angus> other environments, even if it returns only std::string()? > > OK, leave it like that. I guess what I do not like is that there is > too much testing on USE_xx_PACKAGING. I think all the methods of > Package that have such dependency should be abstract virtual, and an > actual implementation should be provided by a descendent. That's how > we do things in OOP, isn't it?
That's one way to do it. Note that Boost does not do it that way, the rationale being that only one choice exists for a given platform and that such a situation is best provided for using the preprocessor. I'm going to go with os_win32.h -- Angus