techoe / gflags

Automatically exported from code.google.com/p/gflags
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

DEFINE_ list is incomplete #63

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The list of DEFINE's is incomplete, which makes the library inconvenient to 
use.  For example, there are no (un)signed 16-bit integer flags, no signed 
64-bit integer, no wide strings (i.e. std::wstring).

Not having these forces library users to do the conversions, which reduces the 
usability of gflags.

Original issue reported on code.google.com by and...@spacemonkey.com on 13 Dec 2012 at 2:31

GoogleCodeExporter commented 9 years ago
Thanks for the feedback, Andrew. The main reason to not support all possible C 
types was certainly motivated by the paradigm to keep the API as lean as 
possible. If you consider that the gflags library is intended for the parsing 
of command-line flags, I think there is good reason to only support primitive 
types such as (signed) integral numbers, floating-point numbers (e.g., always 
single or double precision only), and strings.

From the mentioned missing types, I wonder how you would go ahead and support 
std::wstring? As the input argument will be a multi-byte string, a conversion 
is necessary. Does this conversion not depend on the particular code page used?

Original comment by andreas....@gmail.com on 14 Jan 2013 at 3:08