docs: correct spelling and grammar

This commit is contained in:
ivanpanch
2025-08-28 00:08:03 +02:00
committed by GitHub
parent fd4a02f7e9
commit 4287ba32b7
13 changed files with 41 additions and 41 deletions

View File

@@ -9,7 +9,7 @@
namespace boost { namespace program_options { namespace command_line_style {
/** Various possible styles of options.
There are "long" options, which start with "--" and "short",
There are "long" options, which start with "--", and "short",
which start with either "-" or "/". Both kinds can be allowed or
disallowed, see allow_long and allow_short. The allowed character
for short options is also configurable.
@@ -51,7 +51,7 @@ namespace boost { namespace program_options { namespace command_line_style {
/** Allow to merge several short options together,
so that "-s -k" become "-sk". All of the options
but last should accept no parameter. For example, if
"-s" accept a parameter, then "k" will be taken as
"-s" accepts a parameter, then "k" will be taken as
parameter, not another short option.
Dos-style short options cannot be sticky.
*/

View File

@@ -11,12 +11,12 @@
namespace boost {
/** The 'eof_iterator' class is useful for constructing forward iterators
in cases where iterator extract data from some source and it's easy
in cases where the iterator extracts data from some source and it's easy
to detect 'eof' \-- i.e. the situation where there's no data. One
apparent example is reading lines from a file.
Implementing such iterators using 'iterator_facade' directly would
require to create class with three core operation, a couple of
require to create class with three core operations, a couple of
constructors. When using 'eof_iterator', the derived class should define
only one method to get new value, plus a couple of constructors.

View File

@@ -51,7 +51,7 @@ namespace boost { namespace program_options {
{}
};
/** Class thrown when there are programming error related to style */
/** Class thrown when there are programming errors related to style */
class BOOST_PROGRAM_OPTIONS_DECL BOOST_SYMBOL_VISIBLE invalid_command_line_style : public error {
public:
invalid_command_line_style(const std::string& msg)
@@ -83,7 +83,7 @@ namespace boost { namespace program_options {
* Options are displayed in "canonical" form
* This is the most unambiguous form of the
* *parsed* option name and would correspond to
* option_description::format_name()
* option_description::format_name(),
* i.e. what is shown by print_usage()
*
* The "canonical" form depends on whether the option is
@@ -243,7 +243,7 @@ namespace boost { namespace program_options {
* It makes no sense to have an option name, when we can't match an option to the
* parameter
*
* Having this a part of the error_with_option_name hierachy makes error handling
* Having this as part of the error_with_option_name hierarchy makes error handling
* a lot easier, even if the name indicates some sort of conceptual dissonance!
*
* */
@@ -275,7 +275,7 @@ namespace boost { namespace program_options {
/** Class thrown when there's ambiguity amoung several possible options. */
/** Class thrown when there's ambiguity among several possible options. */
class BOOST_PROGRAM_OPTIONS_DECL BOOST_SYMBOL_VISIBLE ambiguous_option : public error_with_no_option_name {
public:
ambiguous_option(const std::vector<std::string>& xalternatives)

View File

@@ -105,7 +105,7 @@ namespace program_options {
/** Returns the canonical name for the option description to enable the user to
recognised a matching option.
recognise a matching option.
1) For short options ('-', '/'), returns the short name prefixed.
2) For long options ('--' / '-') returns the first long name prefixed
3) All other cases, returns the first long name (if present) or the short

View File

@@ -150,7 +150,7 @@ namespace boost { namespace program_options {
instance of basic_option<charT> will be added to result,
with 'unrecognized' field set to 'true'. It's possible to
collect all unrecognized options with the 'collect_unrecognized'
funciton.
function.
*/
basic_command_line_parser& allow_unregistered();
@@ -214,7 +214,7 @@ namespace boost { namespace program_options {
/** Collects the original tokens for all named options with
'unregistered' flag set. If 'mode' is 'include_positional'
also collects all positional options.
Returns the vector of origianl tokens for all collected
Returns the vector of original tokens for all collected
options.
*/
template<class charT>
@@ -254,8 +254,8 @@ namespace boost { namespace program_options {
/** Splits a given string to a collection of single strings which
can be passed to command_line_parser. The second parameter is
used to specify a collection of possible seperator chars used
for splitting. The seperator is defaulted to space " ".
used to specify a collection of possible separator chars used
for splitting. The separator is defaulted to space " ".
Splitting is done in a unix style way, with respect to quotes '"'
and escape characters '\'
*/

View File

@@ -37,7 +37,7 @@ namespace boost { namespace program_options {
public:
positional_options_description();
/** Species that up to 'max_count' next positional options
/** Specifies that up to 'max_count' next positional options
should be given the 'name'. The value of '-1' means 'unlimited'.
No calls to 'add' can be made after call with 'max_value' equal to
'-1'.

View File

@@ -51,7 +51,7 @@ namespace boost { namespace program_options {
/** Parses a group of tokens that specify a value of option.
Stores the result in 'value_store', using whatever representation
is desired. May be be called several times if value of the same
is desired. May be called several times if value of the same
option is specified more than once.
*/
virtual void parse(boost::any& value_store,
@@ -71,7 +71,7 @@ namespace boost { namespace program_options {
virtual ~value_semantic() {}
};
/** Helper class which perform necessary character conversions in the
/** Helper class which performs necessary character conversions in the
'parse' method and forwards the data further.
*/
template<class charT>
@@ -140,7 +140,7 @@ namespace boost { namespace program_options {
bool is_required() const { return false; }
/** If 'value_store' is already initialized, or new_tokens
has more than one elements, throws. Otherwise, assigns
has more than one element, throws. Otherwise, assigns
the first string from 'new_tokens' to 'value_store', without
any modifications.
*/
@@ -157,7 +157,7 @@ namespace boost { namespace program_options {
};
#ifndef BOOST_NO_RTTI
/** Base class for all option that have a fixed type, and are
/** Base class for all options that have a fixed type, and are
willing to announce this type to the outside world.
Any 'value_semantics' for which you want to find out the
type can be dynamic_cast-ed to typed_value_base. If conversion
@@ -218,7 +218,7 @@ namespace boost { namespace program_options {
/** Specifies an implicit value, which will be used
if the option is given, but without an adjacent value.
Using this implies that an explicit value is optional,
Using this implies that an explicit value is optional.
*/
typed_value* implicit_value(const T &v)
{
@@ -228,7 +228,7 @@ namespace boost { namespace program_options {
return this;
}
/** Specifies the name used to to the value in help message. */
/** Specifies the name used for the value in the help message. */
typed_value* value_name(const std::string& name)
{
m_value_name = name;
@@ -278,7 +278,7 @@ namespace boost { namespace program_options {
}
/** Specifies that no tokens may be provided as the value of
this option, which means that only presense of the option
this option, which means that only presence of the option
is significant. For such option to be useful, either the
'validate' function should be specialized, or the
'implicit_value' method should be also used. In most

View File

@@ -62,7 +62,7 @@ namespace boost { namespace program_options {
: v(xv), m_defaulted(xdefaulted)
{}
/** If stored value if of type T, returns that value. Otherwise,
/** If stored value is of type T, returns that value. Otherwise,
throws boost::bad_any_cast exception. */
template<class T>
const T& as() const {
@@ -138,7 +138,7 @@ namespace boost { namespace program_options {
const abstract_variables_map* m_next;
};
/** Concrete variables map which store variables in real map.
/** Concrete variables map which stores variables in real map.
This class is derived from std::map<std::string, variable_value>,
so you can use all map operators to examine its content.