|
Boost : |
Subject: Re: [boost] [Review] Boost.Convert library, last day
From: Vicente BOTET (vicente.botet_at_[hidden])
Date: 2011-05-03 11:56:21
> Message du 03/05/11 14:20
> De : "Thomas Heller"
> A : boost_at_[hidden]
> Copie à :
> Objet : Re: [boost] [Review] Boost.Convert library, last day
> Sorry, this statement is wrong.
> At the very least convert::from returns exactly one thing which is
> this converter thingy,
> which is implicitly converted to either convert::result or T. And
> yes, this means that
> the result is different based on the LHS of from, which is out of your
> control and doomed to fail.
> I wonder how much codes breaks by having this.
> Consider the following example:
>
> #include
> #include
>
> template
> void f(std::basic_string string)
> {}
>
> int main()
> {
> f(boost::convert::from(123));
> }
>
> Which is not working because of this design flaw I constantly keep
> mocking about.
>
> Sorry to be the party pooper here. But your design is just confusing
> and does not
> really work like you are advertising it.
I've the impression that if what you are saying is right, this is a show stopper for the adoption of this interface.
Could you show the compile error?
Best,
Vicente
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk