$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [Boost.Units] quantity<unit> problem with	template specialisation algorithm?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-05-13 13:45:50
AMDG
Thomas Shorrock wrote:
> many thankyous to the developers of Boost.Units and Boost libraries generally, 
> I have been using them for a few years now and this is my first difficulty.
>
> I have been having some problems when using template specialisation (g++ 4.4.3) with Boost.Units (Boost 1_42_0). 
> When calling a specialised template function I have found that I need to be very careful with the argument,
>
> In short,
> specialised_templated_function(1.0 * boost::units::si::metre)   works fine
> specialised_templated_function(1    * boost::units::si::metre)   specialised function is not found (default tried)
>   
1 * boost::units::si::metre returns 
boost::units::quantity<boost::units::si::length, int>,
which doesn't match boost::units::quantity<boost::units::si::lenth, double>.
You would have the same problem if you used built-in types directly.
In Christ,
Steven Watanabe