From 46437cc5c9978207ccd5742ed810583d900cb8ad Mon Sep 17 00:00:00 2001 From: Dirk Stolle Date: Thu, 1 Dec 2022 00:13:34 +0100 Subject: [PATCH] Fix several typos (#4, thanks @striezel) --- README.md | 4 ++-- example/CMakeLists.txt | 2 +- include/nonstd/bit.hpp | 6 +++--- test/bit.t.cpp | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6768b89..ed2430a 100644 --- a/README.md +++ b/README.md @@ -152,10 +152,10 @@ The version of *bit lite* is available via tag `[.version]`. The following tags ### A.2 Bit lite test specification ```Text -bit_cast<>(): succesfully roundtrips uint64_t via double [bit.cast] +bit_cast<>(): successfully roundtrips uint64_t via double [bit.cast] has_single_bit(): single bit yields false for no bits set [bit.pow.two] has_single_bit(): single bit yields true for single bits set [bit.pow.two] -has_single_bit(): single bit yields false for mutiple bits set [bit.pow.two] +has_single_bit(): single bit yields false for multiple bits set [bit.pow.two] bit_ceil(): let N be the smallest power of 2 greater than or equal to x [bit.pow.two] bit_floor(): x == 0, 0; otherwise the maximal value y such that has_single_bit(y) is true and y <= x [bit.pow.two] bit_width: x == 0, 0; otherwise one plus the base-2 logarithm of x, with any fractional part discarded [bit.pow.two] diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index dcb2323..c72014b 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -57,7 +57,7 @@ else() message( STATUS "Matched: nothing") endif() -# Function to emulate ternary operaton `result = b ? x : y`: +# Function to emulate ternary operation `result = b ? x : y`: macro( ternary var boolean value1 value2 ) if( ${boolean} ) diff --git a/include/nonstd/bit.hpp b/include/nonstd/bit.hpp index 0f4c952..ee3be1d 100644 --- a/include/nonstd/bit.hpp +++ b/include/nonstd/bit.hpp @@ -256,7 +256,7 @@ namespace nonstd # define bit_ENABLE_IF_R_(R, VA) R #endif -// Method enabling (funtion template argument): +// Method enabling (function template argument): #if bit_HAVE( TYPE_TRAITS ) && bit_HAVE( DEFAULT_FUNCTION_TEMPLATE_ARG ) // VS 2013 seems to have trouble with SFINAE for default non-type arguments: @@ -332,7 +332,7 @@ typedef integral_constant< bool, false > false_type; template< class T, class U > struct is_same : std11::true_type{}; #endif -} // namepsace std11 +} // namespace std11 // C++20 emulation: @@ -341,7 +341,7 @@ namespace std20 { template< class T, class U > struct same_as : std11::integral_constant::value && std11::is_same::value> {}; -} // namepsace std20 +} // namespace std20 // // For reference: diff --git a/test/bit.t.cpp b/test/bit.t.cpp index f4a75c0..c40ef1a 100644 --- a/test/bit.t.cpp +++ b/test/bit.t.cpp @@ -73,7 +73,7 @@ using namespace nonstd; #define no_constexpr /*constexpr*/ -CASE( "bit_cast<>(): succesfully roundtrips uint64_t via double" " [bit.cast]" ) +CASE( "bit_cast<>(): successfully roundtrips uint64_t via double" " [bit.cast]" ) { const uint64_t v = 0x3fe9000000000000ull; @@ -97,7 +97,7 @@ CASE( "has_single_bit(): single bit yields true for single bits set" " [bit.pow. } } -CASE( "has_single_bit(): single bit yields false for mutiple bits set" " [bit.pow.two]" ) +CASE( "has_single_bit(): single bit yields false for multiple bits set" " [bit.pow.two]" ) { typedef unsigned long type; const int N = CHAR_BIT * sizeof(type);