Opened 15 years ago

Closed 15 years ago

#360 closed request (fixed)

template function to check if a string is convertable to a specific numerical type

Reported by: Peter Owned by: Peter
Priority: minor Milestone: yat 0.5
Component: utility Version: trunk
Keywords: Cc:


Currently, there are function is_int, is_double and is_float. It would be convenient to have a wrapper to these functions that will work in a template context.

It should behave very much like utility::convert with but rather than throwing when conversion is not possible, the function should return false. If conversion is possible obviously true should be returned.

For completeness, I think the functions should be overloaded/specialized for each numerical type.

If we wanna keep old is_* functions, I think we should reimplement them using this function.

Change History (2)

comment:1 Changed 15 years ago by Peter

Milestone: yat 0.x+yat 0.5
Owner: changed from Jari Häkkinen to Peter
Status: newassigned

comment:2 Changed 15 years ago by Peter

Resolution: fixed
Status: assignedclosed

fixed in [1312]

Note: See TracTickets for help on using tickets.