Boost logo

Boost Users :

Subject: Re: [Boost-users] [Boost.Units] Trouble with I/O and specific scaled units
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-10-21 11:55:52


AMDG

On 10/20/2011 06:24 PM, Michael J Iatauro wrote:
> typedef make_scaled_unit<second, scale<60, static_rational<1> > >::type
> minute;
>
> <snip>
>
> I tried adding
>
> std::string name_string(const minute&) {
> return "min";
> }
>
> std::string symbol_string(const minute&) {
> return "min";
> }
>
> but that didn't change anything. Interestingly, if I change the scale
> from 60 to 10, it compiles and runs fine. What am I missing?
>

Where did you put the overloads? They
need to go in namespace boost::units, to
be found by ADL.

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net