On Dec 7, 2009, at 10:38 AM, Roy Stogner wrote:

> 
> On Mon, 7 Dec 2009, Derek Gaston wrote:
> 
>> Ok - we've tried this out.  It was missing a piece of
>> functionality... the ability to take "true" or "false" in as a
>> boolean.  We added this back in and committed the new getpot-roy.h.
> 
> Thanks.  Any idea why the bool case wasn't adequately handled by the
> template?  Is it inadvertently upcasting to int or something?  I
> needed the const char* overloading to handle memory management of C
> strings, but I thought the rest would work with the generic code.

Well... I actually just changed our small modification to now do a proper 
template specialization.  The issue is that you need a special 
__convert_to_type for bool so that it looks for "true" or "false".

I suspect that the default templated version of __convert_to_type() was failing 
to convert a std::string with "true" in it to a bool on the line that does 
"in_string >> retval".  In which case the default value gets returned.

>> We also had to change a few things in our source code... but nothing
>> major.
> 
> I hate to be a pain in the neck, but would you let me know every one
> of the minor things?  Ideally I'd like this new file to be completely
> backwards compatible both with the libMesh fork of GetPot and with the
> main GetPot.  Everyone who has to change their libMesh code is someone
> who might be bugging us on the mailing list later, and if there's
> anything incompatible with GetPot 1.1.18 then it'll be that much
> harder to talk Frank-Rene Schaefer into merging our changes upstream.

parse_input_file() changed to parse_file().... that's it!

So, yeah.... that's pretty minor. ;-)

Derek
------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Libmesh-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to