Skip to content

Commit

Permalink
Fixed Typos (foonathan#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
MandarJKulkarni authored and foonathan committed Feb 15, 2018
1 parent 96662e1 commit 847557d
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 23 deletions.
6 changes: 3 additions & 3 deletions include/type_safe/boolean.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace type_safe
///
/// It is a tiny, no overhead wrapper over `bool`.
/// It can only be constructed from `bool` values
/// and does not implictly convert to integral types.
/// and does not implicitly convert to integral types.
/// \module types
class boolean
{
Expand Down Expand Up @@ -187,10 +187,10 @@ namespace type_safe
};

/// Comparison functors similar to the `std::` version,
/// but explictly cast the result of the comparison to `bool`.
/// but explicitly cast the result of the comparison to `bool`.
///
/// This allows using types where the comparison operator returns [ts::boolean](),
/// as it can not be implictly converted to `bool`
/// as it can not be implicitly converted to `bool`
/// so, for example, [std::less]() can not be used.
/// \notes These comparison functors are always transparent,
/// i.e. can be used with two different types.
Expand Down
2 changes: 1 addition & 1 deletion include/type_safe/bounded_type.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ namespace type_safe
\
/** Initializes it with a dynamic bound.
* \effects Copies (1)/moves (2) the object and uses that as bound.
* \notes These constructors only participate in overload resoltuion,
* \notes These constructors only participate in overload resolution,
* if a dynamic bound is used, i.e. `Bound` is [ts::constraints::dynamic_bound]().
* \group dynamic_ctor
* \param Condition
Expand Down
2 changes: 1 addition & 1 deletion include/type_safe/deferred_construction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace type_safe
/// It works especially well with [ts::output_parameter]().
///
/// It has two states:
/// Either it is *intialized* in which case you can get its value,
/// Either it is *initialized* in which case you can get its value,
/// or it is *un-initialized* in which case you cannot get its value.
/// All objects start out un-initialized.
/// For consistency with [ts::basic_optional]() it provides a similar interface,
Expand Down
2 changes: 1 addition & 1 deletion include/type_safe/flag.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace type_safe
public:
flag() = delete;

/// \effects Gives the flag the intial state.
/// \effects Gives the flag the initial state.
/// \notes This function does not participate in overload resolution if `T` is not a boolean type.
/// \param 1
/// \exclude
Expand Down
2 changes: 1 addition & 1 deletion include/type_safe/index.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace type_safe
///
/// It is a [ts::strong_typedef]() for [ts::size_t]().
/// It is comparable and you can increment and decrement it,
/// as well as adding/subtracing a [ts::distance_t]().
/// as well as adding/subtracting a [ts::distance_t]().
/// \notes It has a similar interface to a `RandomAccessIterator`,
/// but without the dereference functions.
/// \module types
Expand Down
2 changes: 1 addition & 1 deletion include/type_safe/output_parameter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace type_safe
{
/// A tiny wrapper modelling an output parameter of a function.
///
/// An output paramater is a paramter that will be used to transport output of a function to its caller,
/// An output parameter is a parameter that will be used to transport output of a function to its caller,
/// like a return value does.
/// Usually they are implemented with lvalue references.
/// They have a couple of disadvantages though:
Expand Down
14 changes: 7 additions & 7 deletions include/type_safe/reference.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,16 +274,16 @@ namespace type_safe
/// A reference to an array of objects of type `T`.
///
/// It is a simple pointer + size pair that allows reference access to each element in the array.
/// An "array" here is any continguous storage (so C arrays, [std::vector](), etc.).
/// An "array" here is any contiguous storage (so C arrays, [std::vector](), etc.).
/// It does not allow changing the size of the array, only the individual elements.
/// Like [ts::object_ref]() it can be safely used in containers.
///
/// If the given type is `const`, it will only return a `const` reference to each elment,
/// If the given type is `const`, it will only return a `const` reference to each element,
/// but then `XValue` must be `false`.
///
/// If `XValue` is `true`, dereferencing will [std::move()]() the object,
/// modelling a reference to an expiring lvalue.
/// \notes `T` is the type stored in the array, so `array_ref<int>` to reference a contigous storage of `int`s.
/// \notes `T` is the type stored in the array, so `array_ref<int>` to reference a contiguous storage of `int`s.
/// \notes Unlike the other types it isn't technically non-null,
/// as it may contain an empty array.
/// But the range `[data(), data() + size)` will always be valid.
Expand Down Expand Up @@ -543,7 +543,7 @@ namespace type_safe
/// It can refer to any function that is compatible with given signature.
///
/// A function is compatible if it is callable with regular function call syntax from the given argument types,
/// and its return type is either implictly convertible to the specified return type
/// and its return type is either implicitly convertible to the specified return type
/// or the specified return type is `void`.
///
/// In general it will store a pointer to the functor,
Expand Down Expand Up @@ -584,9 +584,9 @@ namespace type_safe

/// \effects Creates a reference to the function created by the stateless lambda.
/// \notes This constructor is intended for stateless lambdas,
/// which are implictly convertible to function pointers.
/// which are implicitly convertible to function pointers.
/// It does not participate in overload resolution,
/// unless the type is implictly convertible to a function pointer
/// unless the type is implicitly convertible to a function pointer
/// that is compatible with the specified signature.
/// \notes Due to to implementation reasons,
/// it does not work for polymorphic lambdas,
Expand Down Expand Up @@ -622,7 +622,7 @@ namespace type_safe
/// unless the signature of `other` is compatible with the specified signature.
/// \notes This constructor may create a bigger conversion chain.
/// For example, if `other` has signature `void(const char*)` it can refer to a function taking `std::string`.
/// If this signature than accepts a type `T` implictly convertible to `const char*`,
/// If this signature than accepts a type `T` implicitly convertible to `const char*`,
/// calling this will call the function taking `std::string`, converting `T -> std::string`,
/// even though such a conversion would be ill-formed otherwise.
/// \param 1
Expand Down
2 changes: 1 addition & 1 deletion include/type_safe/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ namespace type_safe
// int is at least 16 bits
return unsigned_t(detail::parse_unsigned<std::uint16_t, Digits...>());
}
} // namespace literalse
} // namespace literals

//=== floating point types ===//
/// \module types
Expand Down
10 changes: 5 additions & 5 deletions include/type_safe/variant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace type_safe
/// There are multiple ways of handling this, so it is outsourced in a policy.
/// The variant policy is a class that must have the following members:
/// * `allow_empty` - either [std::true_type]() or [std::false_type]().
/// If it is "true", the variant can be put in the empty state explictly.
/// If it is "true", the variant can be put in the empty state explicitly.
/// * `void change_value(variant_type<T>, tagged_union<Types...>&, Args&&... args)` - changes the value and type.
/// It will be called when the variant already contains an object of a different type.
/// It must destroy the old type and create a new one with the given type and arguments.
Expand Down Expand Up @@ -255,7 +255,7 @@ namespace type_safe
/// \throws Anything thrown by the chosen assignment operator
/// or the other `emplace()`.
/// If the assignment operator throws,
/// the variant contains a partially assigned oject.
/// the variant contains a partially assigned object.
/// Otherwise it depends on the variant policy.
/// \notes This function does not participate in overload resolution,
/// unless `T` is a valid type for the variant and assignable from the argument
Expand All @@ -277,7 +277,7 @@ namespace type_safe
}

/// Changes the value to a new object of given type.
/// \effects If variant is empty, creates the object directly inplace
/// \effects If variant is empty, creates the object directly in place
/// by perfectly forwarding the arguments.
/// Otherwise it forwards to the variant policy's `change_value()` function.
/// \throws Anything thrown by `T`s constructor or possibly move constructor.
Expand Down Expand Up @@ -306,7 +306,7 @@ namespace type_safe
}

public:
//=== abservers ===//
//=== observers ===//
/// \returns The type id representing the type of the value currently stored in the variant.
/// \notes If it does not have a value stored, returns [*invalid_type]().
type_id type() const noexcept
Expand Down Expand Up @@ -930,7 +930,7 @@ namespace type_safe
///
/// When changing the type of the variant, it will use a the move constructor with a temporary.
/// If the move constructor throws, the variant will be left in the empty state.
/// Putting it into the empty state explictly is not allowed.
/// Putting it into the empty state explicitly is not allowed.
/// \module variant
using rarely_empty_variant_policy = detail::non_empty_variant_policy<false>;

Expand Down
4 changes: 2 additions & 2 deletions include/type_safe/visitor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ namespace type_safe
/// where the `i`th argument is the `value()` of the `i`th optional or `nullopt`, if it has none.
/// If the particular combination of types is not overloaded,
/// the program is ill-formed,
/// unelss the `Visitor` provides a member named `incomplete_visitor`,
/// unless the `Visitor` provides a member named `incomplete_visitor`,
/// then `visit()` does not do anything instead of the error.
/// \returns The result of the chosen `operator()`,
/// its the type is the common type of all possible combinations.
Expand Down Expand Up @@ -399,7 +399,7 @@ namespace type_safe
/// otherwise the behavior is undefined.
/// If the particular combination of types is not overloaded,
/// the program is ill-formed,
/// unelss the `Visitor` provides a member named `incomplete_visitor`,
/// unless the `Visitor` provides a member named `incomplete_visitor`,
/// then `visit()` does not do anything instead of the error.
/// \returns The result of the chosen `operator()`,
/// its the type is the common type of all possible combinations.
Expand Down

0 comments on commit 847557d

Please sign in to comment.