Opened 13 years ago

Closed 13 years ago

#330 closed enhancement (fixed)

use convert in istream constructor for Vector a Matrix

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

Description

Constructing matrix/vector from stream involves checking if string is a double and convert string to a double. Currently this is done using is_double and atof. Looking at code of is_double you realize that the conversion to double is already there. So if we could just return the double occurring in is_double and report somehow if it is not a double, we could avoid the call to atof.

This is exactly what is done in convert<double>(string). If the string is not convertible an exception is thrown.

Change History (3)

comment:1 Changed 13 years ago by Peter

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

comment:2 Changed 13 years ago by Peter

Status: newassigned

comment:3 Changed 13 years ago by Peter

Resolution: fixed
Status: assignedclosed

fixed in [1313] and [1314]

Note: See TracTickets for help on using tickets.