Is there a good general purpose options class for c++?
<p>Each time I write another one of my small c++ toy programs, I come across the need for a small, easy-to-use options/parameter class. Here is what it should be able to do:</p>

<ul>
<li>accept at least ints, doubles, string parameters</li>
<li>easy way to add new options</li>
<li>portable, small and fast</li>
<li>free</li>
<li>read options from a file and/or command line</li>
<li>upper and lower bounds for parameters </li>
<li>and all the other neat useful things I am not thinking of right now</li>
</ul>

<p>What I want to do is pass a pointer to this class to the builder and all of my strategy objects, so they can read the parameters of the algorithm I am running (e.g. which algorithm, maximum number of iterations etc.)</p>

<p>Can someone point me to an implementation that achieves at least some of these things?</p>
