From 99f58714d19feeed87c7f43d79c2e4d9593484de Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Sat, 2 Aug 2014 16:15:00 +0400 Subject: [PATCH] Fix a lot of typos [refs #10294](https://svn.boost.org/trac/boost/ticket/10294) --- doc/type_index.qbk | 8 ++++---- examples/exact_types_match.cpp | 2 +- examples/table_of_names.cpp | 4 ++-- include/boost/type_index/ctti_type_index.hpp | 8 ++++---- .../boost/type_index/detail/compile_time_type_info.hpp | 2 +- include/boost/type_index/stl_type_index.hpp | 2 +- include/boost/type_index/type_index_facade.hpp | 4 ++-- test/type_index_test.cpp | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/doc/type_index.qbk b/doc/type_index.qbk index 083a33b..586ba5f 100644 --- a/doc/type_index.qbk +++ b/doc/type_index.qbk @@ -274,7 +274,7 @@ Issues with cross module type comparison on a bugged compilers are bypassed by d [section Making a custom type_index] -Sometimes there may be a need to create your own type info system. This may be usefull if you wish to store some more info about types (PODness, size of a type, pointers to common functions...) or if you have an idea of a more compact types representations. +Sometimes there may be a need to create your own type info system. This may be useful if you wish to store some more info about types (PODness, size of a type, pointers to common functions...) or if you have an idea of a more compact types representations. [import ../examples/user_defined_typeinfo.hpp] [import ../examples/user_defined_typeinfo.cpp] @@ -378,7 +378,7 @@ function signature including template parameters. If the output of `boost::typeindex::ctti_type_index::type_id().name()` * returns not just `int` but also a lot of text around the `int` * or does not return type at all -then you are usng a compiler that was not tested with this library and you need to setup the +then you are using a compiler that was not tested with this library and you need to setup the [macroref BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING] macro. Here is a short instruction: @@ -394,7 +394,7 @@ Here is a short instruction: * `skip_at_begin` is equal to `skip_at_begin` at step 2 * `skip_at_end` is equal to `skip_at_end` at step 2 * `"T = "` is equal to characters that are right before the `int` in output -# (optional, but highly recomended) [@http://www.boost.org/support/bugs.html create ticket] with +# (optional, but highly recommended) [@http://www.boost.org/support/bugs.html create ticket] with feature request to add your compiler to supported compilers list. Include parameters provided to `BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING` macro. @@ -415,7 +415,7 @@ Another example: `boost::typeindex::ctti_type_index::type_id().raw_name()` returns "static const char *boost::detail::ctti::n() [T = int]"". Then you shall set `skip_at_begin` to `sizeof("static const char *boost::detail::ctti<") - 1` -and `skip_at_end` to `sizeof("]") - 1` and last parameter of macto to "T = ". +and `skip_at_end` to `sizeof("]") - 1` and last parameter of macro to "T = ". `` #define BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING (39, 1, true, "T = ") diff --git a/examples/exact_types_match.cpp b/examples/exact_types_match.cpp index f5d0115..fc39f26 100644 --- a/examples/exact_types_match.cpp +++ b/examples/exact_types_match.cpp @@ -50,7 +50,7 @@ int main() { int i = 100; // An attempt to convert stored function to a function accepting reference - func.call(i); // Will throw, because types `int&` and `int` missmatch + func.call(i); // Will throw, because types `int&` and `int` mismatch assert(false); } catch (const std::runtime_error& /*e*/) {} diff --git a/examples/table_of_names.cpp b/examples/table_of_names.cpp index 5d542b5..262e5f4 100644 --- a/examples/table_of_names.cpp +++ b/examples/table_of_names.cpp @@ -78,10 +78,10 @@ int main() { [[In ns3::{anonymous}::ns4 namespace][`N3ns312_GLOBAL__N_13ns412in_anon_typeE`] [`ns3::(anonymous namespace)::ns4::in_anon_type`] [`ns3::{anonymous}::ns4::in_anon_type]`] ] [[Template class][`5templIsiE`] [`templ`] [`templ]`] ] [[Template class (full specialization)][`5templIiiE`] [`templ`] [`templ]`] ] - [[Template class with templae classes][`5templIS_IcaES_Ii17user_defined_typeEE`] [`templ, templ >`] [`templ, templ >]`] ] + [[Template class with template classes][`5templIS_IcaES_Ii17user_defined_typeEE`] [`templ, templ >`] [`templ, templ >]`] ] ] - We have not show the "noRTTI & pretty_name" column in the table becuse it is almost equal + We have not show the "noRTTI & pretty_name" column in the table because it is almost equal to "noRTTI & raw_name" column. [warning With RTTI off different classes with same names in anonymous namespace may collapse. See 'RTTI emulation limitations'. ] diff --git a/include/boost/type_index/ctti_type_index.hpp b/include/boost/type_index/ctti_type_index.hpp index 2e9858d..ac1e5d2 100644 --- a/include/boost/type_index/ctti_type_index.hpp +++ b/include/boost/type_index/ctti_type_index.hpp @@ -35,10 +35,10 @@ namespace boost { namespace typeindex { namespace detail { // That's the most trickiest part of the TypeIndex library: -// 1) we do not whant to give user ability to manually construct and compare `struct-that-represents-type` -// 2) we need to distinguish beteween `struct-that-represents-type` and `const char*` +// 1) we do not want to give user ability to manually construct and compare `struct-that-represents-type` +// 2) we need to distinguish between `struct-that-represents-type` and `const char*` // 3) we need a thread-safe way to have references to instances `struct-that-represents-type` -// 4) we need a compile-time control to make shure that user does not copy or +// 4) we need a compile-time control to make sure that user does not copy or // default construct `struct-that-represents-type` // // Solution would be the following: @@ -72,7 +72,7 @@ private: } // namespace detail -/// Helper method for getting detail::ctti_data of a tempalte patameter T. +/// Helper method for getting detail::ctti_data of a template parameter T. template inline const detail::ctti_data& ctti_construct() BOOST_NOEXCEPT { // Standard C++11, 5.2.10 Reinterpret cast: diff --git a/include/boost/type_index/detail/compile_time_type_info.hpp b/include/boost/type_index/detail/compile_time_type_info.hpp index 2a14edb..8ee4c66 100644 --- a/include/boost/type_index/detail/compile_time_type_info.hpp +++ b/include/boost/type_index/detail/compile_time_type_info.hpp @@ -107,7 +107,7 @@ namespace boost { namespace detail { /// Noncopyable type_info that does not require RTTI. /// CTTI == Compile Time Type Info. -/// This name must be as short as posible, to avoid code bloat +/// This name must be as short as possible, to avoid code bloat template struct ctti { diff --git a/include/boost/type_index/stl_type_index.hpp b/include/boost/type_index/stl_type_index.hpp index 4d94795..1b3b0c4 100644 --- a/include/boost/type_index/stl_type_index.hpp +++ b/include/boost/type_index/stl_type_index.hpp @@ -228,7 +228,7 @@ inline stl_type_index stl_type_index::type_id() BOOST_NOEXCEPT { || (defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 744) // Old EDG-based compilers seem to mistakenly distinguish 'integral' from 'signed integral' - // in typeid() expressions. Full temaplte specialization for 'integral' fixes that issue: + // in typeid() expressions. Full template specialization for 'integral' fixes that issue: typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_< boost::is_signed, boost::make_signed, diff --git a/include/boost/type_index/type_index_facade.hpp b/include/boost/type_index/type_index_facade.hpp index 355464c..c18ea4b 100644 --- a/include/boost/type_index/type_index_facade.hpp +++ b/include/boost/type_index/type_index_facade.hpp @@ -70,13 +70,13 @@ public: typedef TypeInfo type_info_t; /// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw. - /// \return Name of a type. By default retuns Derived::raw_name(). + /// \return Name of a type. By default returns Derived::raw_name(). inline const char* name() const BOOST_NOEXCEPT { return derived().raw_name(); } /// \b Override: This function \b may be redefined in Derived class. Overrides may throw. - /// \return Human redable type name. By default retuns Derived::name(). + /// \return Human readable type name. By default returns Derived::name(). inline std::string pretty_name() const { return derived().name(); } diff --git a/test/type_index_test.cpp b/test/type_index_test.cpp index 8f2771a..532fb80 100644 --- a/test/type_index_test.cpp +++ b/test/type_index_test.cpp @@ -117,7 +117,7 @@ static void test_with_modofiers() { BOOST_CHECK(t1 < t2.type_info() || t2 < t1.type_info()); BOOST_CHECK(t1 > t2.type_info() || t2 > t1.type_info()); - // Chaecking that comparisom operators overloads compile + // Chaecking that comparison operators overloads compile BOOST_CHECK(t1 <= t2 || t2 <= t1); BOOST_CHECK(t1 >= t2 || t2 >= t1); BOOST_CHECK(t1.type_info() <= t2 || t2.type_info() <= t1);