
Beman Dawes wrote:
A slightly updated version of http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2615.html was accepted at the C++ committee meeting last week. It provides clocks, time points, and time durations for the C++0x standard library, and slightly modifies the threads interface already voted into C++0x to use these features. The only change in the version of the proposal actually voted in, IIRC, was to leave identity alone. The final document will appear in the post-meeting mailing in about two weeks.
Although these clock and time features evolved from Boost Date-Time, the actual realization is quite different. So we've got a transition that has to be managed. I'd personally like to see that transition occur quickly, both because Boost.Threads depends on these features, and because I can now bring forward an improved Boost.Timer based on these features.
One suggestion is for Boost to provide an implementation of the headers to be added to C++0x, and then to use those headers in the various Boost libraries that need them. But I haven't thought it out in any detail.
How should we proceed? Comments? Ideas? Suggestions?
I've emailed Howard to see if his prototype implementation can be made available with the Boost license. The answer was yes, but he points out that an independent implementation would be better in terms of flushing out issues with the proposed text for the standard. The proposal has several components: * common_type: "common_type is a trait that takes 1 or more types, and returns a type which all of the types will convert to." Presumably it should be added to Boost.TypeTraits. It is closely related to promote<>. * ratio: "ratio is a general purpose utility inspired by Walter Brown allowing one to easily and safely compute rational values at compile time." The proposal puts this in the Utilities chapter of the standard library. It has a lot of similarity to type traits. * duration/clock/time_point: This stuff is closely related to Boost.DateTime, yet because it is part of C++0x it needs special treatment WRT header names, namespaces, documentation, etc. * threads: Interface changes to use the new duration/clock/time_point features. This clearly lands in the lap of Anthony and the other Boost.Threads maintainers. --Beman