Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-11-12 06:26:16


Vladimir Prus wrote:
> Beman Dawes wrote:
>
>> The critical technical change required is internationalization. The
>> plan is to provide a templated basic_path class, with typedefs for
>> path and wpath. In other words, an approach very similar to the
>> current std::basic_string, std::string, and std::wstring.
>
> I don't this that's a good idea. Which type is supposed to be used in
> binary library interfaces? path or wpath? If 'path', then what
> happens if I pass a wpath to that library? If 'wpath' should always
> be used, then why would I ever want to use 'path'?

Binary library interfaces should provide both.

> I'd be much happier with design like this:
>
> class path {
> public:
> path(char*);
> path(wchar_t*);
> string file_string() const;
> wstring file_wstring() const;
> };

Right, this makes omitting an overload impossible, but it may create other
problems. :-)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk