Boost logo

Boost :

Subject: Re: [boost] [convert] no-throw and fallback feature
From: Vladimir Batov (vbatov_at_[hidden])
Date: 2011-05-10 02:53:47


> From: "Stewart, Robert" <Robert.Stewart_at_[hidden]>
>> Vicente BOTET wrote:
>
>> The same applies to classes. For me convert stands for a
>> function, converter for a class, convertible for an interface
>> and conversion for a namespace. I'm sure you agree with me on
>> this common usage.
>
> Yes, certainly.

Conventions are good as far as they serve a purpose. Blindly following
anything (a particular convention in this case) is questionable. The
distinction between classes and functions is quite blurred IMO. Do I need to
mention a functor? In the end, the user does not give a hoot about any
particular conventions the author might have been following as long as the
resulting code is clean/easy to read. With that in mind it's hard to beat
boost::convert::to<int>. Anything else mentioned so far (like
boost::conversion::convert_to, etc.) seem inferior to me (your mileage may
vary).

V.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk