Boost logo

Boost :

Subject: [boost] convert_to: generic conversion between unrelated types
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2009-03-16 18:33:44


Hi,

I need to convert to two unrelated types as chrono::duration and posix_time::time_duration. I have defined a generic function conver_to which use the constructor or conversion operator is the exists. Otherwise the user needs to specialize partially or completly) this function with the unrelated types. This function could be specialized with string and use Boost.StringConvert.

In case there is an interest I have attached the files.

Best,
Vicente





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