
Zach Laine wrote:
What is your evaluation of the design?
It is very straightforward, being basically a bag of functions :). Having said that, it would be easier to use the facets in "Facets for Infinity and NaN" if I could call a single function that does the work in each of the three examples. The examples seem to indicate boilerplate code that will be repeated by most, if not all, users. It therefore make sense to me to provide convenience functions that do that work. For instance, this:
locale old_locale; locale tmp_locale(old_locale, new nonfinite_num_put<char>); locale new_locale(tmp_locale, new nonfinite_num_get<char>);
stringstream ss; ss.imbue(new_locale);
would be easier to accomplish with a convenience function like this:
stringstream ss; reasonable_function_name(ss);
If there is a technical reason why this is not possible, that would be helpful to note this near the examples.
That is of course possible, but I'm not convinced it is desirable. 1. I like to keep the interface minimal. 2. A few calls to C++ standard library functions may be easier to read than a single call to a custom function. [snip]
What is your evaluation of the documentation?
It is adequate. It would be better if it were done in QuickBook.
That will be taken care of.
Since the rationale for creating the Sign Bit functions (as stated in the Sign Bit intro) includes applicability to 0 and NaN, it would be nice to see those represented in the examples.
I have never had any use for that particular functionality myself. But it is in TR1. [snip] Thanks for the review! --Johan