On Sat, 1 Sep 2007 23:56:47 +0200 Tommi Mäkitalo <[EMAIL PROTECTED]> wrote:
> Hello again, > > now I can verify the problem after fixing the complile errors. Try > adding "c2d.getInt()" into your tonum.cpp after declaring c2d and you > get a linker error. At least I get. Hello Tommi, That was silly of me to place the templates in the source file, yes of course they should be in the header file. I sent you an email with some updated diffs. > Another problem are possible overflows in Decimal::getInteger. We > should really handle this using the std::numeric_limits-templates by > thowing std::overflow_error in case of an overflow. > > > Tommi I've tweaked it to try to detect overflow errors, and re-ran the tests with the 4 databases. Also I tweaked it to use std::iostream::peek() in order to try to avoid reading eof(). I wasn't sure if we should throw std::overflow_error when reading Decimals from an std::istream, instead I just set the fail bit. Thanks very much. Regards, Mark > On Saturday 01 September 2007 23:38:05 Tommi Mäkitalo wrote: > > Hello Mark, > > > > thank you. I got your zip-file and uploaded it to > > http://www.tntnet.org/download/decimal_sep_2_2007.zip. > > Maybe someone else is also interested. > > > > I quickly looked at the code and it looks very good. > > > > I just wonder, why you put the template method Decimal::getInteger > > into the cpp-file. Templates do not work, if they are not known at > > compile time. That's why they must be in the header. Do that code > > work for you? > > > > There are some compile errors, when I apply your patch, but they > > look trivial. I fix them and do some testing. > > > > Tommi > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a > > browser. Download your FREE copy of Splunk now >> > > http://get.splunk.com/ > > _______________________________________________ Tntnet-general > > mailing list [email protected] > > https://lists.sourceforge.net/lists/listinfo/tntnet-general > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a > browser. Download your FREE copy of Splunk now >> > http://get.splunk.com/ _______________________________________________ > Tntnet-general mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/tntnet-general -- ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Tntnet-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tntnet-general
