aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.md4
-rw-r--r--README.md2
-rw-r--r--ThirdPartyNotices.txt2
-rw-r--r--include/gsl/gsl_util7
-rw-r--r--include/gsl/pointers8
-rw-r--r--tests/multi_span_tests.cpp4
-rw-r--r--tests/notnull_tests.cpp4
7 files changed, 17 insertions, 14 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 10e6c32..990b8e1 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,6 +1,6 @@
-## Contributing to the Guideline Support Library
+## Contributing to the Guidelines Support Library
-The Guideline Support Library (GSL) contains functions and types that are suggested for use by the
+The Guidelines Support Library (GSL) contains functions and types that are suggested for use by the
[C++ Core Guidelines](https://github.com/isocpp/CppCoreGuidelines). GSL design changes are made only as a result of modifications to the Guidelines.
GSL is accepting contributions that improve or refine any of the types in this library as well as ports to other platforms. Changes should have an issue
diff --git a/README.md b/README.md
index 183553f..df9fcb8 100644
--- a/README.md
+++ b/README.md
@@ -36,6 +36,8 @@ The test suite that exercises GSL has been built and passes successfully on the
* GNU/Linux using Clang/LLVM 6.0
* GNU/Linux using Clang/LLVM 7.0
* GNU/Linux using GCC 5.1
+* OS X Mojave 10.14.4 using Apple LLVM version 10.0.0 (10.0.1.10010046)
+* OS X Mojave 10.14.3 using Apple LLVM version 10.0.0 (clang-1000.11.45.5)
* OS X Yosemite using Xcode with Apple Clang 7.0.0.7000072
* OS X Yosemite using GCC-5.2.0
* OS X Sierra 10.12.4 using Apple LLVM version 8.1.0 (Clang-802.0.42)
diff --git a/ThirdPartyNotices.txt b/ThirdPartyNotices.txt
index 94b9acc..ebf7b6e 100644
--- a/ThirdPartyNotices.txt
+++ b/ThirdPartyNotices.txt
@@ -2,7 +2,7 @@
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
Do Not Translate or Localize
-GSL: Guideline Support Library incorporates third party material from the projects listed below. The original copyright notice and the license under which Microsoft received such third party material are set forth below. Microsoft reserves all other rights not expressly granted, whether by implication, estoppel or otherwise.
+GSL: Guidelines Support Library incorporates third party material from the projects listed below. The original copyright notice and the license under which Microsoft received such third party material are set forth below. Microsoft reserves all other rights not expressly granted, whether by implication, estoppel or otherwise.
1. Catch (https://github.com/philsquared/Catch)
diff --git a/include/gsl/gsl_util b/include/gsl/gsl_util
index 0fce689..e4b2daa 100644
--- a/include/gsl/gsl_util
+++ b/include/gsl/gsl_util
@@ -24,7 +24,7 @@
#include <exception> // for exception
#include <initializer_list> // for initializer_list
#include <type_traits> // for is_signed, integral_constant
-#include <utility> // for forward
+#include <utility> // for exchange, forward
#if defined(_MSC_VER) && !defined(__clang__)
@@ -59,10 +59,7 @@ class final_action
public:
explicit final_action(F f) noexcept : f_(std::move(f)) {}
- final_action(final_action&& other) noexcept : f_(std::move(other.f_)), invoke_(other.invoke_)
- {
- other.invoke_ = false;
- }
+ final_action(final_action&& other) noexcept : f_(std::move(other.f_)), invoke_(std::exchange(other.invoke_, false)) {}
final_action(const final_action&) = delete;
final_action& operator=(const final_action&) = delete;
diff --git a/include/gsl/pointers b/include/gsl/pointers
index 0f2987a..7373826 100644
--- a/include/gsl/pointers
+++ b/include/gsl/pointers
@@ -197,7 +197,7 @@ namespace gsl
//
// Restricts a pointer or smart pointer to only hold non-null values,
//
-// - provides a strict (i.e. explicit contructor from T) wrapper of not_null
+// - provides a strict (i.e. explicit constructor from T) wrapper of not_null
// - to be used for new code that wishes the design to be cleaner and make not_null
// checks intentional, or in old code that would like to make the transition.
//
@@ -205,9 +205,9 @@ namespace gsl
// by strict_not_null and fix compilation errors
//
// Expect to
-// - remove all unneded conversions from raw pointer to not_null and back
-// - make API clear by specifyning not_null in parameters where needed
-// - remove unnesessary asserts
+// - remove all unneeded conversions from raw pointer to not_null and back
+// - make API clear by specifying not_null in parameters where needed
+// - remove unnecessary asserts
//
template <class T>
class strict_not_null: public not_null<T>
diff --git a/tests/multi_span_tests.cpp b/tests/multi_span_tests.cpp
index 7c3e87c..0aa0ff9 100644
--- a/tests/multi_span_tests.cpp
+++ b/tests/multi_span_tests.cpp
@@ -1226,6 +1226,8 @@ TEST_CASE("md_access")
expected += 3;
}
}
+
+ delete[] image_ptr;
}
GSL_SUPPRESS(con.4) // NO-FORMAT: attribute
@@ -1622,6 +1624,8 @@ TEST_CASE("span_structure_size")
multi_span<const double, dynamic_range, 6, 4> av2 =
as_multi_span(av1, dim(5), dim<6>(), dim<4>());
(void) av2;
+
+ delete[] arr;
}
GSL_SUPPRESS(con.4) // NO-FORMAT: attribute
diff --git a/tests/notnull_tests.cpp b/tests/notnull_tests.cpp
index ce5a123..010dd00 100644
--- a/tests/notnull_tests.cpp
+++ b/tests/notnull_tests.cpp
@@ -234,8 +234,8 @@ void ostream_helper(T v)
{
std::ostringstream os;
std::ostringstream ref;
- os << p;
- ref << &v;
+ os << static_cast<void*>(p);
+ ref << static_cast<void*>(&v);
CHECK(os.str() == ref.str());
}
{