On Fri, Oct 21, 2011 at 9:55 AM, Steven Watanabe
<watanabesj@gmail.com> wrote:
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.
Ah! Actually, I bumped into this one not long ago. Instead of boost::units I was building up a namespace along the lines cs:units for our company's name-sake and to avoid too much in the way of namespace collusion. So in that case, I would still need my names and symbols kept in boost::units.
In Christ,
Steven Watanabe