I've been looking around for a unit conversion library. I've seen some on http://groups.yahoo.com/group/boost/files/ but am wondering if any have been put into boost release yet. Thanks, Chris
On Wed, 22 Dec 2004 15:33:18 -0700, Chris Goller wrote
I've been looking around for a unit conversion library. I've seen some on http://groups.yahoo.com/group/boost/files/ but am wondering if any have been put into boost release yet.
Nope, none are in a boost release. And I think that the most active author has recently abandoned his effort :-( So I'm afraid you shouldn't expect anything soon. Jeff
Jeff Garland wrote:
On Wed, 22 Dec 2004 15:33:18 -0700, Chris Goller wrote
I've been looking around for a unit conversion library. I've seen some on http://groups.yahoo.com/group/boost/files/ but am wondering if any have been put into boost release yet.
Nope, none are in a boost release. And I think that the most active author has recently abandoned his effort :-( So I'm afraid you shouldn't expect anything soon.
Jeff Are you referring to something like this:
boost_1_32_0/libs/mpl/doc/tutorial/dimensional-analysis.html
Dan Dimerman wrote:
Jeff Garland wrote:
On Wed, 22 Dec 2004 15:33:18 -0700, Chris Goller wrote
I've been looking around for a unit conversion library. I've seen some on http://groups.yahoo.com/group/boost/files/ but am wondering if any have been put into boost release yet.
Nope, none are in a boost release. And I think that the most active author has recently abandoned his effort :-( So I'm afraid you shouldn't expect anything soon.
Jeff Are you referring to something like this:
boost_1_32_0/libs/mpl/doc/tutorial/dimensional-analysis.html
I believe he's refering to Andy Little's pqs library. Andy announced recently that he wasn't going to propose it for review, but he didn't say why. I never looked at it. Matthias Schabel also was working on a physical quantities library in the last year or so, but I haven't heard anything recently. David and Aleksey appear to discuss dimencional anaylsis in some detail here: http://www.artima.com/cppsource/metafunctions.html, but I don't know how close this comes to a full-fledged dimensional anaylsis library. Jonathan
"Jonathan Turkanis"
Dan Dimerman wrote:
Jeff Garland wrote:
On Wed, 22 Dec 2004 15:33:18 -0700, Chris Goller wrote
I've been looking around for a unit conversion library. I've seen some on http://groups.yahoo.com/group/boost/files/ but am wondering if any have been put into boost release yet.
Nope, none are in a boost release. And I think that the most active author has recently abandoned his effort :-( So I'm afraid you shouldn't expect anything soon.
Jeff Are you referring to something like this:
boost_1_32_0/libs/mpl/doc/tutorial/dimensional-analysis.html
I believe he's refering to Andy Little's pqs library. Andy announced recently that he wasn't going to propose it for review, but he didn't say why. I never looked at it.
In fishing for feedback on boost devel recently: http://aspn.activestate.com/ASPN/Mail/Message/boost/2201024 I came to the conclusion that the interest was not there.( At some point one has to take an executive decision as to where ones time can be spent most profitably. ) A large amount of work would be required both in converting the implementation to integrate better with and reuse boost components and in upgrading the documentation. Among the bones of contention in a review would be the type deduction mechanism, which is a major part of the library,eg a substitute for current lack of decltype, auto typeof etc. ( I dont think it will be possible to do units really cleanly until C++ has this in place in the language). However I hope I have provided One reasonably complete solution to some of the details of the problems of units (eg the semantics of operations) That is I believe an area that has not had so much work done ( as opposed to the compile time dimensional analysis) as well as the useability aspect ( the 'user interface') as indicated in the afore mentioned thread , which I have attempted to document in the public version of the library. , so I recommend any one interested in units to take a look: http://www.servocomm.freeserve.co.uk/Cpp/physical_quantity/index.html The latest public download on the above site, pqs-2-00-02, has been tested only on VC7.1 and gcc3.2 and is reported by Terje Slettebo as not compiling on Intel C++ 7.1 regards Andy Little
in upgrading the documentation. Among the bones of contention in a review would be the type deduction mechanism, which is a major part of the library,eg a substitute for current lack of decltype, auto typeof etc. ( I dont think it will be possible to do units really cleanly until C++ has
"Andy Little"
in place in the language).
I remember you once considered using the BOOST_TYPEOF facility. Have you decided against using it after all? What was the primary reason of this decision? Regards, Arkadiy
"Arkadiy Vertleyb"
"Andy Little"
wrote in upgrading the documentation. Among the bones of contention in a review would be the type deduction mechanism, which is a major part of the library,eg a substitute for current lack of decltype, auto typeof etc. ( I dont think it will be possible to do units really cleanly until C++ has this in place in the language).
I remember you once considered using the BOOST_TYPEOF facility. Have you decided against using it after all?
No I simply havent tried it out with pqs. I apologise as I said that I would try it in pqs out some months ago. I will try to spend some time on it and get back to you. However there are various aspects to type deduction and I dont expect BOOST_TYPEOF to cover all of them. I think it is more of a user mechanism. rather than an implementation mechanism. ( Well for me as macros cause me error finding problems... maybe this is a user issue too.) pqs requires a fair amount of template machinery in the implementation ( and I think some might be needed in pqs even with mods to the language). regards Andy little
"Andy Little"
I remember you once considered using the BOOST_TYPEOF facility. Have you decided against using it after all?
No I simply havent tried it out with pqs. I apologise as I said that I would try it in pqs out some months ago. I will try to spend some time on it and get back to you.
I'm guessing that template parameters are a no-go. OTOH can I register the following: template < typename A, template <typename> class Op, typename B, typename Enable = void > struct binary_operation; (Basically I am not able to compile and wonder if this may be the issue) . currently registered with: BOOST_TYPEOF_REGISTER_TEMPLATE(binary_operation,4); regards Andy little
I'm guessing that template parameters are a no-go. OTOH can I register
"Andy Little"
following:
template < typename A, template <typename> class Op, typename B, typename Enable = void > struct binary_operation;
(Basically I am not able to compile and wonder if this may be the issue) .
Yes, unfortunately we only support type and integral template parameters,
but not template template parameters :-( Supporting template template
parameters just looks impossible to me, since templates can't be returned
from metafunctions (you can't typedef them).
OTOH, if you are willing to change your interface just a little, and just
use a wrapper over your operation, something like this:
struct plus_identity
{
template
"Arkadiy Vertleyb"
"Andy Little"
wrote
(Basically I am not able to compile and wonder if this may be the issue) .
Yes, unfortunately we only support type and integral template parameters, but not template template parameters :-( Supporting template template parameters just looks impossible to me, since templates can't be returned from metafunctions (you can't typedef them).
No sweat. Its still pretty impressive AFAICS. I am pondering a complete overhaul of my pqs lib, in which case I would certainly make it compatible. regards Andy Little
Dan Dimerman wrote:
Jeff Garland wrote:
On Wed, 22 Dec 2004 15:33:18 -0700, Chris Goller wrote
I've been looking around for a unit conversion library. I've seen some on http://groups.yahoo.com/group/boost/files/ but am wondering if any have been put into boost release yet.
Nope, none are in a boost release. And I think that the most active author has recently abandoned his effort :-( So I'm afraid you shouldn't expect anything soon.
Jeff Are you referring to something like this:
boost_1_32_0/libs/mpl/doc/tutorial/dimensional-analysis.html
Those examples actually don't deal with units at all, but dimensions. You could add units as a layer on top of that library, but it would still be a little bit rudimentary. A full-fledged effort would inlude support for fractional powers of dimensions, for example. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com
participants (7)
-
Andy Little
-
Arkadiy Vertleyb
-
Chris Goller
-
Dan Dimerman
-
David Abrahams
-
Jeff Garland
-
Jonathan Turkanis