
2 Sep
2006
2 Sep
'06
9:34 p.m.
David Abrahams <dave <at> boost-consulting.com> writes:
Why not just use mpl::sort?
Because AFAIK it needs some compairison metafunction as argument and I have none. But I solved my problem. It's actually quiet simple: typedef unit<quantity<length, 1, time_, -1> >meter1; typedef unit<quantity<time_, -1, length, 1> >meter2; // only overload for 1 unit ostream&operator<<(ostream&out, meter1); //... meter2 foo; cout<<foo; // implicit conversion does the ordering for me