Boost logo

Boost Users :

Subject: Re: [Boost-users] [units] check if quantities are convertible one into the other
From: Matthias Schabel (boost_at_[hidden])
Date: 2010-12-15 18:20:45


>>> The ability to test for a conversion is liable to result in
>>> ODR problems. On the other hand, the errors are
>>> pretty horrendous right now.
>> I am not sure how ODR applies here.
>
> is_convertible would depend on which headers
> are #included. This makes ODR violations really easy.

We could, however, make is_convertible mean "potentially convertible" by just verifying that the dimensions are consistent...then there is no ODR problem, it just doesn't guarantee that the conversion is defined even though it is possible.

Matthias


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