From 71a5f857e1748001631ea8b6abc8afa62d37e198 Mon Sep 17 00:00:00 2001 From: Kevin Bracey Date: Mon, 12 Aug 2019 16:06:41 +0300 Subject: [PATCH 1/3] Fix cxxsupport/README.md typo --- platform/cxxsupport/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/cxxsupport/README.md b/platform/cxxsupport/README.md index d35a71248a6..6f811cbac58 100644 --- a/platform/cxxsupport/README.md +++ b/platform/cxxsupport/README.md @@ -16,7 +16,7 @@ Omissions are: User code should normally be able to include C++14 headers and get most expected functionality. (But bear in mind that many C++ library features like streams and STL containers are quite heavy and may -not be appropriate for small embnedded use). +not be appropriate for small embedded use). However, ARM C 5 has only C++11 language support (at least a large subset), and no C++11/14 library. For the headers that are totally new in C++11, From cb5c09ff921399494030f4eefd9bc330ac92737b Mon Sep 17 00:00:00 2001 From: Kevin Bracey Date: Mon, 12 Aug 2019 16:08:09 +0300 Subject: [PATCH 2/3] ARMC5 std::reference_wrapper - drop dead code --- platform/cxxsupport/mstd_functional | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/platform/cxxsupport/mstd_functional b/platform/cxxsupport/mstd_functional index 991f1b41610..072f06082fa 100644 --- a/platform/cxxsupport/mstd_functional +++ b/platform/cxxsupport/mstd_functional @@ -89,23 +89,14 @@ namespace std { // [refwrap] template class reference_wrapper { - T &FUN(T &x) noexcept { return x; } - void FUN(T &&x) = delete; T *ptr; public: using type = T; // [refwrap.const] -#if 0 - // decltype doesn't seem to work well enough for this revised version - template >::value && - !is_void()))>::value>> - reference_wrapper(U&& x) //noexcept(noexcept(FUN(declval()))) - : ptr(addressof(FUN(forward(x)))) { } -#else + // LWG 2993 version of constructor does not seem to work in ARM C 5, so stick with + // this original version. reference_wrapper(T &x) noexcept : ptr(addressof(x)) { } reference_wrapper(T &&x) = delete; -#endif reference_wrapper(const reference_wrapper &) noexcept = default; // [refwrap.assign] From ff0ce04d1129b131b84c9034ed7b2c8fed9caf9b Mon Sep 17 00:00:00 2001 From: Kevin Bracey Date: Mon, 12 Aug 2019 16:08:40 +0300 Subject: [PATCH 3/3] mstd::not_fn - fix declaration --- platform/cxxsupport/mstd_functional | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/cxxsupport/mstd_functional b/platform/cxxsupport/mstd_functional index 072f06082fa..afe84a5ea89 100644 --- a/platform/cxxsupport/mstd_functional +++ b/platform/cxxsupport/mstd_functional @@ -474,7 +474,7 @@ public: } template -impl::not_fn_t not_fn_t(F&& f) +impl::not_fn_t not_fn(F&& f) { return impl::not_fn_t(std::forward(f)); }