Boost logo

Boost :

From: Martin (adrianm_at_[hidden])
Date: 2005-07-11 15:10:05


Been on vacation for a couple of weeks and missed the filesystem mini-review
deadline.

Here are som quick comments anyway:

- What is your evaluation of the design?

I think that the general design is very nice but I have a few issues:

1. The basic_path template parameter "String" defines the type used to store
the path internally but at the same time it
also defines the type used for construction and operator/.

Consider the following example:
I want to store the path in shared memory and therefore use a flex_string type
with a 200 character internal buffer.
Problem here is that now the path can only be created from this 200 character
flex_string and not from std::string.
One solution might be to let the constructor and operator/ work with ranges
but it might create problems with copy constructor.

template <typename RangeT>
explicit basic_path(const RangeT& str) {
  append(begin(str), end(str))
}

2. All operations work with std::(w)string.

When the internal string type is not std::string a conversion is necessary. In
most cases the charcater conversion should be trivial but since a std::string
is required a copy can't be avoided.

In the example I used above, the flex_string must be copied into a std::string
for each operation even if the character string is identical.

Why not base operations on null terminated strings (const char*) or a pair of
iterators instead.

3. Comparison between paths doesn't use locale.

The paths are not treated as plain characters since a lexicographical compare
is made. But the individual elements are treated
as plain characters and the internal string type's operator< is used. This is
a bit contradicting.

I think the comparison operators should compare the elements in a locale
dependent way.

- What is your evaluation of the implementation

no comment

- What is your evaluation of the documentation?

Very good.

- Did you try to use the library? With what compiler? Did you have any
problems?

Haven't tried the i18n version yet.

- How much effort did you put into your evaluation? A glance? A quick reading?
In-depth study?

I have used the original filesystem library for approx 1 year and I have
followed the i18n development closly.

- Are you knowledgeable about the problem domain?

yes, but I have only used the windows part (i.e. no portability).

- Do you think the library should be accepted as a Boost library?

yes.


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