Abseil C++#
Links#
Purpose#
Parse command-line flags
Development tools and libraries
Motivation#
The command-line flags parser allows the use of a flagfile
For example, it is useful to save login credentials in an appropriately permissioned file to avoid leaking secrets through
/proc/cmdline
Containers has better performance compared to the standard library
For example,
absl::flat_hash_map
has better cache-locality compared tostd::unordered_map
The library is open-source, well maintained, of high quality, and well documented
Flags#
Use underscore to separate words
Correct
--foo_bar 123
Wrong
--foo-bar 123
A flagfile can be used (note assignment is required)
echo << EOF > flags.cfg --foo_bar=123 EOF some-app --flagfile flags.cfg